:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --yellow: #facc15;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

img,
video {
  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: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.94));
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 42px rgba(2, 6, 23, 0.38);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 32px rgba(34, 211, 238, 0.24);
}

.brand-name {
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #67e8f9, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.25s ease, transform 0.25s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #cbd5e1;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-menu {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

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

.hero {
  position: relative;
  height: 640px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-gradient {
  position: absolute;
  inset: 0;
}

.hero-gradient-side {
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.9) 38%, rgba(2, 6, 23, 0.24) 70%, transparent 100%);
}

.hero-gradient-bottom {
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.24) 36%, transparent 66%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1280px) / 2 + 16px));
  top: 50%;
  transform: translateY(-50%);
  width: min(680px, calc(100% - 48px));
  display: grid;
  gap: 20px;
}

.hero-kicker,
.section-kicker {
  margin: 0;
  width: fit-content;
  color: #67e8f9;
  font-size: 0.88rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  backdrop-filter: blur(10px);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 4.7rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-summary {
  max-width: 640px;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #dbeafe;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.22);
  font-size: 0.82rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.btn-ghost {
  color: #dbeafe;
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.66);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 50px;
  height: 50px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.48);
  backdrop-filter: blur(12px);
  font-size: 2.1rem;
  line-height: 1;
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.search-band,
.section-wrap,
.page-hero,
.detail-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.search-band {
  margin-top: -44px;
  position: relative;
  z-index: 5;
}

.search-panel,
.search-page-box,
.filter-bar,
.rank-panel,
.player-card,
.detail-text,
.category-tile,
.movie-card,
.page-hero {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 22px;
  align-items: center;
  padding: 28px;
  border-radius: 28px;
}

.search-panel h2,
.section-head h2,
.rank-panel h2,
.detail-text h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.search-panel p,
.page-hero p,
.detail-line,
.detail-text p,
.category-tile em,
.footer-grid p {
  color: var(--muted);
}

.home-search,
.search-page-box {
  display: flex;
  gap: 12px;
}

.home-search input,
.search-page-box input {
  min-width: 0;
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: rgba(2, 6, 23, 0.7);
  padding: 0 18px;
}

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

.section-wrap {
  padding: 76px 0 0;
}

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

.section-head.compact {
  align-items: center;
  margin-bottom: 18px;
}

.section-more {
  color: var(--cyan);
  font-weight: 800;
}

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

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

.category-tile {
  position: relative;
  min-height: 176px;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 24px;
  border-radius: 26px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-glow {
  position: absolute;
  right: -40px;
  top: -50px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.26), transparent 68%);
}

.category-tile strong {
  position: relative;
  z-index: 1;
  font-size: 1.4rem;
}

.category-tile em,
.category-tile small {
  position: relative;
  z-index: 1;
  font-style: normal;
}

.category-tile small {
  color: #67e8f9;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 28px 80px rgba(8, 145, 178, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.86);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-score {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(250, 204, 21, 0.28);
  font-size: 0.82rem;
  font-weight: 800;
}

.movie-card-body {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.movie-card h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.movie-card h2 a:hover {
  color: var(--cyan);
}

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.movie-line {
  display: -webkit-box;
  min-height: 2.8em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.rank-panel {
  align-self: start;
  border-radius: 26px;
  padding: 22px;
}

.rank-item {
  display: grid;
  grid-template-columns: 32px 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rank-item:last-child {
  border-bottom: 0;
}

.rank-no {
  color: var(--yellow);
  font-size: 1.1rem;
  font-weight: 900;
}

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

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

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

.rank-copy em,
.rank-score {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: normal;
}

.rank-score {
  color: #fef08a;
  font-weight: 900;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
}

.horizontal-card {
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.horizontal-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.4);
}

.horizontal-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 16px;
}

.horizontal-card span {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.horizontal-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horizontal-card em {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: normal;
}

.page-hero {
  margin-top: 34px;
  padding: 52px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 80% 15%, rgba(34, 211, 238, 0.18), transparent 20rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.66));
}

.page-hero.slim {
  min-height: 280px;
  display: grid;
  align-items: center;
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
}

.filter-bar {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 24px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

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

.filter-group button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(2, 6, 23, 0.4);
}

.filter-group button.active,
.filter-group button:hover {
  color: #fff;
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(34, 211, 238, 0.18);
}

.search-page-box {
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 24px;
}

.movie-card.hidden-card {
  display: none;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
}

.large-rank {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.66);
  overflow: hidden;
}

.large-rank .rank-item {
  padding: 16px;
}

.sticky-side {
  position: sticky;
  top: 98px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) saturate(1.12);
  transform: scale(1.06);
  opacity: 0.36;
}

.detail-bg span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.66), #020617 96%);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  padding: 38px 0 60px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #cbd5e1;
  margin-bottom: 28px;
}

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

.breadcrumb em {
  color: var(--muted);
  font-style: normal;
}

.detail-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-copy {
  display: grid;
  gap: 18px;
  max-width: 830px;
}

.detail-line {
  margin: 0;
  font-size: 1.18rem;
}

.player-section {
  padding-top: 20px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.46));
}

.play-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.34);
  font-size: 2.2rem;
}

.play-overlay[hidden] {
  display: none;
}

.detail-text {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding: 28px;
  border-radius: 28px;
}

.detail-text p {
  margin: 0;
  font-size: 1.02rem;
}

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

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

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

.footer-grid a {
  display: block;
  color: #cbd5e1;
  margin: 8px 0;
}

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

.footer-brand {
  margin-bottom: 16px;
}

.keyword-line {
  margin: 0;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

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

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

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

  .sticky-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 590px;
  }

  .hero-content {
    top: auto;
    bottom: 72px;
    transform: none;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .home-search,
  .search-page-box {
    flex-direction: column;
  }

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

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

  .detail-poster {
    max-width: 270px;
  }

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

@media (max-width: 560px) {
  .nav-wrap,
  .search-band,
  .section-wrap,
  .page-hero,
  .detail-wrap,
  .footer-grid,
  .footer-bottom,
  .mobile-menu {
    width: min(100% - 24px, 1280px);
  }

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

  .hero {
    height: 620px;
  }

  .hero-content {
    width: calc(100% - 28px);
    left: 14px;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 2.28rem;
  }

  .hero-meta span,
  .detail-meta span {
    font-size: 0.85rem;
  }

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

  .page-hero {
    padding: 30px;
    border-radius: 26px;
  }

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

  .rank-item {
    grid-template-columns: 28px 52px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

  .rail {
    grid-auto-columns: minmax(230px, 84vw);
  }

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