:root {
  --bg: #070b16;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --blue: #60a5fa;
  --purple: #a855f7;
  --red: #ef4444;
  --pink: #ec4899;
  --yellow: #facc15;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 5%, rgba(59, 130, 246, 0.25), transparent 30rem),
    radial-gradient(circle at 80% 10%, rgba(236, 72, 153, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #111827 100%);
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.site-logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
  box-shadow: 0 12px 34px rgba(96, 165, 250, 0.32);
}

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

.nav-link,
.mobile-nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(340px, 36vw);
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  border-radius: 999px;
  padding: 12px 16px;
}

.filter-select option {
  color: #0f172a;
}

.header-search button,
.mobile-search button,
.big-search button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 12px 30px rgba(96, 165, 250, 0.25);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.95);
}

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

.mobile-search {
  display: flex;
  gap: 8px;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
}

.hero-slides,
.hero-slide,
.hero-slide-link {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1s ease, transform 1s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.58) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 1) 0%, rgba(15, 23, 42, 0.45) 46%, transparent 100%);
}

.hero-glow {
  position: absolute;
  width: 46vw;
  height: 46vw;
  left: -15vw;
  bottom: -22vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.28), transparent 65%);
  filter: blur(2px);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: 92px;
}

.hero-eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: #bfdbfe;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 12px;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  max-width: 840px;
  margin: 16px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.55);
}

.hero-content p {
  max-width: 690px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.65);
}

.hero-meta,
.detail-meta,
.movie-card-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.movie-card-topline span,
.detail-tags span,
.movie-tags span,
.ranking-tags span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.1);
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--pink), var(--purple));
  box-shadow: 0 18px 45px rgba(236, 72, 153, 0.26);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.inline-button {
  margin-top: 14px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.glass-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-strip {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.search-strip-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.search-strip h2,
.page-hero h1,
.section-heading h2,
.detail-copy h1,
.player-heading h2,
.detail-content h2 {
  margin: 0;
}

.search-strip p,
.page-hero p,
.detail-one-line,
.detail-content p,
.category-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.85;
}

.big-search {
  display: flex;
  gap: 10px;
}

.content-section {
  padding: 70px 0 10px;
}

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

.section-heading h2 {
  margin-top: 8px;
  font-size: clamp(26px, 3.6vw, 38px);
  letter-spacing: -0.04em;
}

.section-heading a {
  color: #bfdbfe;
  font-weight: 800;
}

.slim-heading h2 {
  font-size: 26px;
}

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

.page-grid {
  padding-bottom: 60px;
}

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

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

.movie-card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.65);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(30, 41, 59, 0.82);
}

.movie-poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
}

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

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

.movie-score {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #111827;
  font-weight: 900;
  background: var(--yellow);
}

.movie-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(239, 68, 68, 0.86);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.28);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.movie-card-topline {
  gap: 6px;
  font-size: 12px;
}

.movie-card-topline span,
.movie-tags span,
.ranking-tags span {
  padding: 4px 8px;
}

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0;
  overflow: hidden;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  font-size: 12px;
}

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

.split-main {
  padding-top: 70px;
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  margin-top: 70px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-index {
  font-size: 20px;
  font-weight: 900;
  color: #93c5fd;
}

.rank-row img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}

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

.rank-meta {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-size: 12px;
}

.page-main {
  padding: 34px 0 70px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0 22px;
  color: var(--dim);
  font-size: 14px;
}

.breadcrumbs a {
  color: #bfdbfe;
}

.page-hero {
  padding: clamp(28px, 5vw, 56px);
  margin-bottom: 26px;
  background:
    linear-gradient(135deg, rgba(96, 165, 250, 0.16), rgba(168, 85, 247, 0.14)),
    var(--panel);
}

.page-hero h1 {
  margin-top: 10px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 820px;
  margin-bottom: 0;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.filter-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-select {
  width: auto;
  min-width: 150px;
}

.no-results {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

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

.category-card a {
  display: block;
  height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card a:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.48);
}

.category-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.category-card-head span {
  font-size: 25px;
  font-weight: 900;
}

.category-card-head strong {
  color: #bfdbfe;
}

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

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

.mini-movie img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.mini-movie span {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-list-page {
  display: grid;
  gap: 14px;
  padding: 0 0 40px;
  margin: 0;
  list-style: none;
}

.ranking-item a {
  display: grid;
  grid-template-columns: 68px 76px minmax(0, 1fr) 86px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item a:hover {
  transform: translateX(4px);
  border-color: rgba(96, 165, 250, 0.4);
}

.ranking-number {
  font-size: 28px;
  font-weight: 900;
  color: #93c5fd;
  text-align: center;
}

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

.ranking-copy strong,
.ranking-copy em,
.ranking-tags {
  display: block;
}

.ranking-copy strong {
  margin-bottom: 6px;
  font-size: 20px;
}

.ranking-copy em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ranking-tags {
  margin-top: 8px;
}

.ranking-side {
  color: #fde68a;
  font-weight: 900;
  line-height: 1.8;
  text-align: right;
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: clamp(24px, 5vw, 42px);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.detail-copy h1 {
  margin-top: 12px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 760px;
  font-size: 18px;
}

.detail-tags,
.ranking-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.detail-tags span {
  padding: 7px 12px;
}

.player-section,
.detail-content {
  margin-top: 28px;
  padding: clamp(18px, 3vw, 28px);
}

.player-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.player-heading span {
  color: var(--dim);
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
}

.player-start span {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding-left: 6px;
  font-size: 38px;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 18px 60px rgba(239, 68, 68, 0.38);
}

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

.detail-content h2 {
  margin-top: 22px;
  font-size: 26px;
}

.detail-content h2:first-child {
  margin-top: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 460px);
  gap: 30px;
  padding: 42px 0;
}

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

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
}

.is-filter-hidden {
  display: none !important;
}

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

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

  .rank-panel {
    position: static;
    margin-top: 0;
  }
}

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

  .site-header-inner {
    height: 66px;
  }

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

  .hero-carousel {
    height: 76vh;
    min-height: 560px;
  }

  .hero-content {
    padding-bottom: 80px;
  }

  .hero-arrow {
    display: none;
  }

  .search-strip-inner,
  .footer-grid,
  .detail-hero,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .big-search,
  .mobile-search {
    flex-direction: column;
  }

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

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

  .ranking-item a {
    grid-template-columns: 52px 66px minmax(0, 1fr);
  }

  .ranking-side {
    grid-column: 3;
    text-align: left;
  }

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

@media (max-width: 560px) {
  .container,
  .site-header-inner,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 38px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .hero-meta,
  .hero-actions,
  .detail-meta,
  .filter-selects {
    align-items: stretch;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

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

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-card p,
  .movie-tags {
    font-size: 12px;
  }

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

  .ranking-item a {
    grid-template-columns: 42px 58px minmax(0, 1fr);
    gap: 10px;
  }

  .ranking-item img {
    width: 58px;
    height: 82px;
  }

  .ranking-copy strong {
    font-size: 16px;
  }

  .player-start span {
    width: 68px;
    height: 68px;
    font-size: 30px;
  }
}
