:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #60a5fa;
  --accent-deep: #2563eb;
  --cyan: #06b6d4;
  --gold: #facc15;
  --danger: #f87171;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.34), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(6, 182, 212, 0.18), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

img.is-hidden {
  opacity: 0;
}

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

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

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

.site-logo::before,
.footer-logo::before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.34);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(96, 165, 250, 0.16);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.84);
  color: #fff;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 10px;
}

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

.hero-slider {
  margin: 28px auto 58px;
}

.hero-stage {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.68));
  box-shadow: var(--shadow);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.56;
  filter: saturate(1.08) contrast(1.05);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.58), rgba(6, 182, 212, 0.24));
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 52%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 44px;
  padding: 72px clamp(28px, 6vw, 76px);
}

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

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

.hero-copy-block h1,
.hero-copy-block h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy-block p,
.page-hero p,
.detail-info p {
  margin: 20px 0 0;
  max-width: 760px;
  color: var(--muted-strong);
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.meta-pills span {
  display: inline-flex;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.filter-bar button,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.hero-search button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-deep), var(--cyan));
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.28);
}

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

.primary-button:hover,
.ghost-button:hover,
.filter-bar button:hover,
.hero-search button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.42);
}

.hero-poster span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: block;
  padding: 12px 14px;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

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

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

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

.hero-search-panel {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  margin: -42px 26px 0;
  position: relative;
  z-index: 5;
}

.hero-search,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 0 16px;
  color: #fff;
  background: rgba(2, 6, 23, 0.54);
  outline: none;
}

.filter-bar select {
  max-width: 180px;
}

.hero-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(128px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.compact-card {
  min-width: 128px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.compact-card img {
  width: 54px;
  height: 72px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

.compact-card span {
  font-size: 13px;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-section {
  margin: 58px 0;
}

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

.section-heading p {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading a {
  color: var(--accent);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.44);
  box-shadow: 0 28px 64px rgba(37, 99, 235, 0.16);
}

.poster-frame {
  position: relative;
  margin: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #0f172a 62%, #020617);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 46%);
}

.poster-frame figcaption {
  position: absolute;
  z-index: 2;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.76);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 14px 14px 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.28;
  min-height: 41px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  margin: 0;
  min-height: 60px;
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted-strong);
  font-size: 12px;
}

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

.category-tile {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.22), transparent 15rem),
    rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-tile strong {
  font-size: 24px;
}

.category-tile p {
  margin: 12px 0 20px;
  color: var(--muted-strong);
}

.category-tile span {
  color: var(--accent);
  font-weight: 900;
}

.page-hero {
  margin: 34px 0 38px;
  padding: 52px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.filter-bar {
  margin: 0 0 24px;
  flex-wrap: wrap;
}

.filter-bar input {
  flex: 1 1 320px;
}

.filter-bar button {
  color: #fff;
  background: rgba(96, 165, 250, 0.18);
}

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

.rank-list li a {
  display: grid;
  grid-template-columns: 56px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-list li a:hover {
  transform: translateX(6px);
  border-color: rgba(96, 165, 250, 0.44);
}

.rank-no {
  color: var(--gold);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-list img {
  width: 86px;
  height: 112px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

.rank-list h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-list p {
  margin: 0;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-mark {
  color: var(--accent);
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  margin: 34px 0 34px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  filter: blur(4px) saturate(1.1);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.84) 58%, rgba(2, 6, 23, 0.48) 100%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 38px;
  padding: 48px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
  box-shadow: 0 26px 68px rgba(0, 0, 0, 0.42);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--accent);
}

.player-section,
.detail-text,
.related-section {
  margin: 38px 0;
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.player-section h2,
.detail-text h2,
.related-section h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.26));
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.play-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-deep), var(--cyan));
  box-shadow: 0 24px 52px rgba(37, 99, 235, 0.36);
  font-size: 32px;
}

.play-overlay strong {
  font-size: 18px;
}

.detail-text p {
  color: var(--muted-strong);
  font-size: 17px;
  margin: 0 0 22px;
}

.detail-text p:last-child {
  margin-bottom: 0;
}

.no-result {
  display: none;
  padding: 24px;
  border-radius: 22px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.76);
}

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

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

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

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

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-poster {
    display: none;
  }

  .hero-search-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

  .menu-button {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: 14px;
  }

  main {
    width: min(100% - 24px, 1180px);
  }

  .hero-stage {
    min-height: 600px;
    border-radius: 26px;
  }

  .hero-content {
    min-height: 600px;
    padding: 42px 22px 76px;
  }

  .hero-copy-block h1,
  .hero-copy-block h2,
  .page-hero h1,
  .detail-info h1 {
    font-size: clamp(34px, 12vw, 52px);
  }

  .hero-search-panel {
    margin: -30px 10px 0;
  }

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

  .filter-bar select {
    max-width: none;
  }

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

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

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

  .page-hero,
  .detail-layout,
  .player-section,
  .detail-text,
  .related-section {
    padding: 22px;
    border-radius: 24px;
  }

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

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

  .rank-list li a {
    grid-template-columns: 40px 72px minmax(0, 1fr);
  }

  .rank-mark {
    grid-column: 3;
  }

  .rank-list img {
    width: 72px;
    height: 96px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
