:root {
  --brand-a: #06b6d4;
  --brand-b: #2563eb;
  --brand-c: #f97316;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

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

body.locked {
  overflow: hidden;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #fff;
  background: linear-gradient(90deg, var(--brand-a), var(--brand-b));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.nav-wrap {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark,
.footer-brand span {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.brand-text {
  white-space: nowrap;
  font-size: 21px;
}

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

.desktop-nav a,
.nav-dropdown button {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown button:hover {
  color: #cffafe;
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 12px);
  width: 176px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.22s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  color: var(--ink);
  border-radius: 10px;
}

.nav-dropdown-menu a:hover {
  color: var(--brand-b);
  background: #ecfeff;
}

.nav-search {
  position: relative;
  width: min(260px, 24vw);
}

.nav-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 0 18px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.search-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(420px, 86vw);
  max-height: 420px;
  overflow: auto;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  display: none;
}

.search-panel.active {
  display: grid;
  gap: 8px;
}

.search-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  transition: background 0.18s ease;
}

.search-item:hover {
  background: #eff6ff;
}

.search-item img {
  width: 48px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: linear-gradient(135deg, #ecfeff, #dbeafe);
}

.search-item strong {
  display: block;
  font-size: 14px;
}

.search-item span {
  color: var(--muted);
  font-size: 12px;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

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

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 18px 18px;
  background: #2563eb;
}

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

.mobile-nav a {
  padding: 10px 0;
  color: #fff;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #22d3ee 0%, #2563eb 55%, #1d4ed8 100%);
}

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

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.1) contrast(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 38%, rgba(255, 255, 255, 0.2), transparent 34%), linear-gradient(90deg, rgba(15, 23, 42, 0.78), rgba(37, 99, 235, 0.42), rgba(6, 182, 212, 0.34));
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: center;
  gap: 48px;
  padding: 72px 0;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 20px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #e0f2fe;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #eff6ff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
}

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

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

.btn-primary {
  color: #1d4ed8;
  background: #fff;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.22);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.btn-ghost {
  color: var(--brand-b);
  background: #eff6ff;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-poster {
  position: relative;
  width: min(100%, 360px);
  justify-self: end;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.45);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.hero-poster-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  right: 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(18px);
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dot.active {
  background: #fff;
}

.hero-quick {
  position: relative;
  z-index: 5;
  margin-top: -42px;
}

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

.quick-card,
.category-card,
.stat-card {
  display: block;
  border-radius: 22px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.quick-card:hover,
.category-card:hover,
.stat-card:hover,
.movie-card:hover,
.rank-row:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.16);
}

.quick-card strong,
.category-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
}

.quick-card span,
.category-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.section {
  padding: 78px 0;
}

.section.soft {
  background: #f8fafc;
}

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

.section-title h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-title p,
.page-title p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.8;
}

.section-line {
  width: 86px;
  height: 4px;
  margin-top: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-a), var(--brand-b));
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
}

.movie-card:not(.movie-card-wide) .movie-cover {
  aspect-ratio: 2 / 3;
}

.movie-card-wide .movie-cover {
  aspect-ratio: 16 / 9;
}

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

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

.movie-year {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-title {
  display: block;
  min-height: 42px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-title:hover {
  color: var(--brand-b);
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
}

.movie-card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.movie-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--brand-b);
  background: #eff6ff;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  min-height: 180px;
  background: linear-gradient(135deg, #ffffff, #ecfeff);
}

.category-card .category-samples {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.category-card .category-samples span {
  color: var(--brand-b);
  font-size: 13px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 82px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-num {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.rank-row img {
  width: 82px;
  height: 110px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
}

.rank-row h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.page-hero {
  color: #fff;
  padding: 72px 0;
  background: linear-gradient(120deg, var(--brand-a), var(--brand-b));
}

.page-title {
  max-width: 780px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 200px 160px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-bar input,
.filter-bar select {
  color: var(--ink);
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.filter-bar input::placeholder {
  color: #94a3b8;
}

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

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), rgba(2, 6, 23, 0.24));
  transition: opacity 0.25s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
}

.play-button {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  transition: background 0.22s ease, transform 0.22s ease;
}

.play-button:hover {
  background: rgba(255, 255, 255, 0.34);
  transform: scale(1.06);
}

.detail-card {
  padding: 30px;
}

.detail-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 26px;
  margin-bottom: 28px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 900;
}

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

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

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

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--brand-b);
  background: #eff6ff;
  font-size: 13px;
  font-weight: 800;
}

.detail-section {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.detail-section + .detail-section {
  margin-top: 24px;
}

.detail-section h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

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

.side-card {
  padding: 22px;
}

.side-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 900;
}

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

.side-related a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
}

.side-related img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
}

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

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

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 34px;
  padding: 54px 0 36px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  display: block;
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer a:hover {
  color: #22d3ee;
}

.footer-brand {
  margin-bottom: 14px;
  color: #fff;
  font-size: 20px;
}

.footer-bottom {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 56px 20px;
  border-radius: 22px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

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

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

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

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

  .nav-wrap {
    justify-content: space-between;
  }

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

  .hero,
  .hero-inner {
    min-height: 740px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 48px 0 90px;
  }

  .hero-poster {
    justify-self: start;
    width: 230px;
  }

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

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

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

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

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

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

  .rank-row .btn-ghost {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

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

  .brand-text {
    font-size: 18px;
  }

  .quick-grid,
  .category-grid,
  .movie-grid,
  .movie-grid.wide,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .movie-card-body {
    padding: 12px;
  }

  .movie-card-body p,
  .movie-tags,
  .movie-meta span:nth-child(2) {
    display: none;
  }

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

  .hero p {
    font-size: 16px;
  }

  .section {
    padding: 52px 0;
  }

  .page-hero {
    padding: 46px 0;
  }

  .detail-card,
  .side-card {
    padding: 18px;
  }
}
