:root {
  color-scheme: dark;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-850: #111c32;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --white: #ffffff;
  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --blue-500: #3b82f6;
  --ring: rgba(14, 165, 233, 0.36);
  --card-shadow: 0 22px 45px rgba(0, 0, 0, 0.28);
  --soft-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

* {
  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;
  line-height: 1.6;
  color: var(--gray-300);
  background: linear-gradient(180deg, var(--slate-950), var(--slate-900) 42%, var(--slate-950));
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand span:last-child {
  background: linear-gradient(90deg, var(--sky-400), var(--blue-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--white);
  background: radial-gradient(circle at 32% 28%, var(--sky-300), var(--sky-500) 52%, var(--blue-500));
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.58);
  font-size: 15px;
}

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

.desktop-nav a,
.mobile-nav a {
  position: relative;
  color: var(--gray-300);
  font-size: 14px;
  font-weight: 650;
  transition: color 0.22s ease;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: var(--sky-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: var(--sky-400);
}

.desktop-nav a:hover::after,
.desktop-nav a.is-active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--gray-300);
  background: rgba(51, 65, 85, 0.8);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--slate-700);
}

.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
}

.mobile-nav a:hover,
.mobile-nav a.is-active {
  background: rgba(14, 165, 233, 0.14);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  min-height: 70vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 70vh;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, var(--slate-950) 0%, rgba(2, 6, 23, 0.76) 45%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding: 0 0 76px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--sky-400);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0 0 18px;
  color: var(--white);
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: clamp(28px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero p,
.page-hero p,
.detail-title p {
  max-width: 760px;
  margin: 0 0 22px;
  color: var(--gray-300);
  font-size: 18px;
}

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

.hero-meta span,
.movie-meta span,
.detail-meta span,
.breadcrumb a,
.breadcrumb span {
  color: var(--gray-400);
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  color: var(--white);
  background: var(--sky-500);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.38);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--sky-600);
  box-shadow: 0 18px 38px rgba(14, 165, 233, 0.5);
}

.btn-secondary {
  color: var(--sky-300);
  border-color: rgba(14, 165, 233, 0.28);
  background: rgba(15, 23, 42, 0.66);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  color: var(--white);
  background: rgba(51, 65, 85, 0.82);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2));
  bottom: 34px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-dots button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: #6b7280;
  transition: width 0.3s ease, background 0.3s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--sky-400);
}

.search-panel {
  position: relative;
  z-index: 4;
  margin-top: -34px;
}

.search-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(18px);
}

.search-card input,
.filter-bar input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 14px;
  outline: none;
  color: var(--white);
  background: rgba(2, 6, 23, 0.56);
  padding: 0 16px;
}

.search-card input:focus,
.filter-bar input:focus {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 4px var(--ring);
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.9));
}

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

.section-head h2,
.block-title,
.detail-section h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.16;
}

.section-head p,
.detail-section p {
  margin: 8px 0 0;
  color: var(--gray-400);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.92);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: var(--card-shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--slate-900);
}

.movie-card-wide .poster-link {
  aspect-ratio: 16 / 10;
}

.poster-link img,
.compact-card img,
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-link img,
.compact-card:hover img,
.category-tile:hover img {
  transform: scale(1.1);
}

.poster-shade,
.compact-gradient,
.category-tile::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.12) 58%, rgba(15, 23, 42, 0.08));
}

.play-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 52px;
  opacity: 0;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.35));
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-mark,
.compact-card:hover .play-mark {
  opacity: 1;
}

.poster-link b,
.compact-card strong {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 14px;
  background: rgba(14, 165, 233, 0.92);
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.3);
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 18px;
  line-height: 1.3;
}

.movie-info h3 a {
  transition: color 0.2s ease;
}

.movie-info h3 a:hover {
  color: var(--sky-400);
}

.movie-line {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-400);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--sky-300);
  font-size: 12px;
  background: rgba(14, 165, 233, 0.1);
}

.compact-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: var(--slate-800);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.compact-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--card-shadow);
}

.compact-card em {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: -webkit-box;
  overflow: hidden;
  color: var(--white);
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-tile {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--slate-800);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
}

.category-tile::after {
  content: "";
}

.category-tile-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 260px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.category-tile h3 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 26px;
}

.category-tile p {
  margin: 0;
  color: var(--gray-300);
  font-size: 14px;
}

.category-tile span {
  margin-top: 14px;
  color: var(--sky-400);
  font-size: 14px;
  font-weight: 800;
}

.page-hero {
  padding: 78px 0 34px;
  background: radial-gradient(circle at 18% 20%, rgba(14, 165, 233, 0.18), transparent 34%), linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.95));
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  margin: 32px 0 8px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.filter-buttons button {
  min-height: 46px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 999px;
  color: var(--gray-300);
  background: rgba(15, 23, 42, 0.72);
  padding: 0 16px;
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
  color: var(--white);
  background: var(--sky-500);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.74);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(56, 189, 248, 0.42);
}

.rank-row img {
  width: 70px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-row h3 {
  margin: 0 0 6px;
  color: var(--white);
  font-size: 17px;
}

.rank-row p {
  display: -webkit-box;
  margin: 0 0 7px;
  overflow: hidden;
  color: var(--gray-400);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-row b {
  color: var(--sky-400);
  font-size: 26px;
}

.detail-hero {
  padding: 36px 0 0;
  background: radial-gradient(circle at 70% 5%, rgba(14, 165, 233, 0.2), transparent 32%);
}

.breadcrumb {
  margin-bottom: 22px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.75fr);
  gap: 34px;
  align-items: start;
}

.player-shell {
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--card-shadow);
}

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

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15), rgba(2, 6, 23, 0.58));
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: var(--sky-500);
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.45);
  font-size: 32px;
  transition: transform 0.22s ease, background 0.22s ease;
}

.play-overlay:hover span {
  transform: scale(1.08);
  background: var(--sky-600);
}

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

.detail-title {
  margin: 24px 0 0;
}

.detail-title h1 {
  font-size: clamp(32px, 4.5vw, 58px);
}

.detail-side {
  position: sticky;
  top: 92px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: var(--slate-800);
  box-shadow: var(--card-shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-card {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.78);
}

.side-card h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 20px;
}

.detail-section {
  padding: 56px 0 0;
}

.detail-section article {
  padding: 28px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-section article p {
  color: var(--gray-300);
  font-size: 16px;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(51, 65, 85, 0.8);
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.site-footer p {
  margin: 0;
  color: var(--gray-400);
}

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

.footer-links a {
  color: var(--gray-400);
  font-size: 14px;
}

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

.footer-bottom {
  padding: 18px 16px 26px;
  color: var(--slate-500);
  text-align: center;
  font-size: 14px;
}

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

@media (max-width: 1100px) {
  .grid-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

  .detail-side {
    position: static;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 18px;
  }

  .side-card {
    margin-top: 0;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero,
  .hero-slide,
  .hero-slide img,
  .hero-content {
    min-height: 74vh;
  }

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

  .search-card,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    justify-content: flex-start;
  }

  .grid-cards,
  .grid-compact,
  .category-grid,
  .ranking-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .grid-compact {
    gap: 18px;
  }

  .compact-card {
    aspect-ratio: 16 / 10;
  }

  .rank-row {
    grid-template-columns: 62px 1fr;
  }

  .rank-row b {
    grid-column: 1 / -1;
    order: -1;
    font-size: 20px;
  }

  .detail-side {
    display: block;
  }

  .detail-poster img {
    max-height: 520px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .section {
    padding: 52px 0;
  }

  .movie-info {
    padding: 15px;
  }
}
