:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-ink: #111827;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-danger: #dc2626;
  --color-warm: #f59e0b;
  --shadow-soft: 0 12px 32px rgba(15, 23, 42, 0.10);
  --shadow-card: 0 8px 22px rgba(15, 23, 42, 0.08);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.90);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

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

.nav-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: #111827;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0f172a);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #374151;
  font-weight: 650;
}

.nav-menu a {
  transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.is-active {
  color: var(--color-primary);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(270px, 28vw);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 14px;
  color: #111827;
}

.header-search button {
  border: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 15px;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  border: 0;
  background: #f3f4f6;
  color: #111827;
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--color-border);
  background: #fff;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
  display: grid;
  gap: 12px;
}

.mobile-menu a {
  font-weight: 650;
  color: #374151;
}

.hero {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
}

.hero-slide.is-active .hero-bg {
  animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.10);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.32) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.12) 45%, rgba(2, 6, 23, 0.55));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 420px);
  align-items: end;
  gap: 48px;
  padding: 86px 0 72px;
}

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

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 750;
  color: #fff;
  background: rgba(37, 99, 235, 0.92);
}

.badge.red {
  background: rgba(220, 38, 38, 0.92);
}

.badge.dark {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  color: #dbeafe;
  font-size: clamp(16px, 1.7vw, 21px);
  max-width: 720px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #cbd5e1;
  margin: 22px 0 30px;
  font-weight: 650;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

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

.btn-light:hover {
  background: rgba(255, 255, 255, 0.20);
}

.hero-poster-card {
  align-self: center;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 26px 60px rgba(2, 6, 23, 0.42);
  backdrop-filter: blur(16px);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #111827;
}

.hero-poster-info {
  padding: 18px;
  color: #fff;
}

.hero-poster-info strong {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
}

.hero-poster-info span {
  color: #cbd5e1;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 28px;
  background: #fff;
}

.main-section {
  padding: 54px 0;
}

.section-block {
  margin-bottom: 58px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0f172a);
}

.section-link {
  color: var(--color-primary);
  font-weight: 750;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.14);
}

.movie-poster {
  position: relative;
  overflow: hidden;
  background: #111827;
  aspect-ratio: 3 / 4;
}

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

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.70), transparent);
}

.poster-tag {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 750;
}

.poster-score {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #111827;
  background: #fbbf24;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 850;
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info p {
  margin: 0 0 12px;
  color: var(--color-muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
}

.movie-meta strong {
  color: var(--color-primary);
}

.category-panel {
  border-radius: 28px;
  padding: 34px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

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

.category-card {
  min-height: 124px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border-radius: 18px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.category-card:hover {
  color: #fff;
  background: var(--color-primary);
  transform: translateY(-3px);
}

.category-card strong {
  font-size: 21px;
}

.category-card span {
  color: var(--color-muted);
}

.category-card:hover span {
  color: #dbeafe;
}

.horizontal-scroller {
  overflow-x: auto;
  padding: 6px 0 16px;
}

.horizontal-track {
  display: flex;
  gap: 18px;
  min-width: max-content;
}

.horizontal-track .movie-card {
  width: 280px;
}

.rank-list {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.rank-item {
  display: grid;
  grid-template-columns: 56px 82px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
}

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

.rank-num {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: #0f172a;
  font-weight: 850;
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  background: var(--color-danger);
}

.rank-thumb {
  width: 82px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.rank-main strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.rank-main span,
.rank-extra {
  color: var(--color-muted);
  font-size: 14px;
}

.page-hero {
  padding: 58px 0 34px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #fff;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 17px;
}

.breadcrumb {
  color: #64748b;
  margin: 18px 0;
  font-size: 14px;
}

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

.filter-card,
.content-card {
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(150px, 1fr));
  gap: 14px;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  padding: 12px 13px;
  outline: 0;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-status {
  margin: 18px 0 0;
  color: var(--color-muted);
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 34px 0 8px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  padding: 9px 13px;
  background: #fff;
  box-shadow: var(--shadow-card);
  font-weight: 750;
  color: #334155;
}

.pagination .current {
  color: #fff;
  background: var(--color-primary);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.player-card {
  background: #020617;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 46px rgba(2, 6, 23, 0.24);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  background: rgba(2, 6, 23, 0.34);
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.94);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.32);
  font-size: 30px;
  padding-left: 4px;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  display: none;
  border-radius: 12px;
  padding: 10px 12px;
  color: #fff;
  background: rgba(220, 38, 38, 0.90);
  text-align: center;
}

.player-message.is-visible {
  display: block;
}

.detail-title {
  margin: 22px 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.meta-chip,
.tag-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 700;
}

.detail-section {
  margin-top: 22px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

.sidebar {
  position: sticky;
  top: 92px;
}

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

.side-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-card img {
  width: 96px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.side-card strong {
  display: block;
  line-height: 1.35;
  margin-bottom: 4px;
}

.side-card span {
  color: var(--color-muted);
  font-size: 13px;
}

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

.site-footer {
  margin-top: 48px;
  background: #111827;
  color: #cbd5e1;
}

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

.footer-inner h2,
.footer-inner h3 {
  color: #fff;
  margin: 0 0 12px;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 16px 0;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

  .sidebar {
    position: static;
  }
}

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

  .nav-toggle {
    display: inline-flex;
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 72px 0 86px;
    align-items: start;
  }

  .hero-poster-card {
    display: none;
  }

  .hero-control {
    top: auto;
    bottom: 25px;
    transform: none;
  }

  .hero-control.prev {
    left: 16px;
  }

  .hero-control.next {
    right: 16px;
  }

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

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

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

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

  .rank-extra {
    display: none;
  }

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

@media (max-width: 560px) {
  .nav-wrap,
  .container,
  .footer-inner,
  .mobile-menu-inner {
    width: min(100% - 24px, 1180px);
  }

  .hero h1 {
    font-size: 34px;
  }

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

  .movie-card {
    border-radius: 16px;
  }

  .category-panel,
  .filter-card,
  .content-card {
    padding: 18px;
  }

  .horizontal-track .movie-card {
    width: 240px;
  }

  .side-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .side-card img {
    width: 86px;
  }
}
