:root {
  color-scheme: light;
  --blue-900: #123b8d;
  --blue-800: #1d4ed8;
  --blue-700: #2563eb;
  --blue-600: #3b82f6;
  --orange-500: #f97316;
  --red-500: #ef4444;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 26px 70px rgba(15, 23, 42, 0.24);
  --radius-lg: 18px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, #1d4ed8, #2563eb, #4f46e5);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.28);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #1d4ed8;
  background: var(--white);
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.brand-name {
  font-size: 24px;
  letter-spacing: -0.02em;
}

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

.desktop-nav a {
  opacity: 0.95;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  display: grid;
  min-width: 190px;
  padding: 10px;
  color: var(--gray-800);
  background: rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--gray-700);
}

.dropdown-panel a:hover {
  color: var(--blue-700);
  background: #eff6ff;
}

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

.nav-search input,
.mobile-search input {
  width: 100%;
  height: 40px;
  padding: 0 16px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  outline: none;
  backdrop-filter: blur(10px);
}

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

.nav-search input:focus,
.mobile-search input:focus {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.16);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  max-height: 390px;
  overflow-y: auto;
  color: var(--gray-900);
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.search-results.open {
  display: block;
}

.search-result-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.2s ease;
}

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

.search-result-item img {
  width: 72px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--gray-100);
}

.search-result-item strong {
  display: block;
  line-height: 1.35;
}

.search-result-item span {
  display: block;
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 12px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  background: #1d4ed8;
}

.mobile-panel.open {
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

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

.mobile-search {
  position: relative;
  margin-bottom: 6px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: var(--slate-950);
}

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

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

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 35%, rgba(249, 115, 22, 0.28), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.1));
}

.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 600px;
}

.hero-copy {
  max-width: 720px;
  color: var(--white);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  margin-bottom: 18px;
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange-500), var(--red-500));
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

.hero h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.pill-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-bottom: 32px;
}

.hero-tags span,
.pill-row span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
}

.hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.primary-btn,
.ghost-btn,
.section-more {
  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.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--white);
  background: linear-gradient(90deg, var(--orange-500), var(--red-500));
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

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

.hero-dot {
  width: 13px;
  height: 13px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 36px;
  background: var(--white);
}

.content-section {
  padding: 72px 0;
}

.white-section {
  background: var(--white);
}

.soft-section {
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
}

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

.section-head h2,
.ranking-head h2,
.detail-card h2,
.sidebar-card h2 {
  margin: 0 0 6px;
  color: var(--gray-900);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--gray-500);
}

.section-more {
  min-height: auto;
  padding: 0;
  color: var(--blue-700);
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-md);
}

.movie-link {
  display: block;
  height: 100%;
}

.movie-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dbeafe;
}

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

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

.cover-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  background: rgba(0, 0, 0, 0.42);
  transition: opacity 0.25s ease;
}

.movie-card:hover .cover-hover {
  opacity: 1;
}

.play-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  padding-left: 3px;
  color: var(--white);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.movie-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.movie-year {
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  background: rgba(0, 0, 0, 0.66);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 17px;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-info h3 {
  color: var(--blue-700);
}

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

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--gray-500);
  font-size: 13px;
}

.tag-row span {
  color: var(--gray-700);
  background: var(--gray-100);
}

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

.category-card {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  color: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-art {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transition: transform 0.35s ease;
}

.category-card:hover .category-art {
  transform: scale(1.05);
}

.category-card-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.category-card p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.82);
}

.category-card span {
  display: inline-flex;
  font-weight: 800;
}

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

.ranking-panel,
.sidebar-card,
.detail-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ranking-head a {
  color: var(--blue-700);
  font-weight: 800;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.mini-card:hover {
  background: #f8fafc;
}

.mini-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: var(--gray-100);
}

.mini-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-card strong {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-card p {
  margin: 6px 0 0;
  color: var(--gray-500);
  font-size: 13px;
}

.mini-rank {
  position: absolute;
  top: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-500), var(--red-500));
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 18% 20%, rgba(249, 115, 22, 0.3), transparent 34%),
    linear-gradient(135deg, #1e3a8a, #2563eb 48%, #7c3aed);
}

.compact-hero {
  padding: 82px 0 72px;
}

.compact-hero h1 {
  max-width: 860px;
}

.small-actions {
  margin-top: 12px;
}

.filter-bar {
  display: flex;
  gap: 16px;
  align-items: end;
  padding: 18px;
  margin-bottom: 26px;
  background: #f8fafc;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
}

.filter-field {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.grow-field {
  flex: 1;
}

.filter-field label {
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 800;
}

.filter-field input,
.filter-field select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  outline: none;
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.13);
}

.detail-main {
  background: #f8fafc;
}

.player-section {
  padding: 28px 0 36px;
  background: var(--slate-950);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: var(--radius-xl);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.movie-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #000000;
  cursor: pointer;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.14), transparent 30%),
    linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 60%);
}

.big-play {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  padding-left: 6px;
  color: var(--white);
  font-size: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-500), var(--red-500));
  box-shadow: 0 18px 38px rgba(239, 68, 68, 0.34);
}

.detail-content-section {
  padding: 36px 0 72px;
}

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

.detail-article {
  display: grid;
  gap: 22px;
}

.detail-card,
.sidebar-card {
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.pill-row {
  margin-bottom: 16px;
}

.pill-row span:nth-child(1) {
  color: #1d4ed8;
  background: #dbeafe;
}

.pill-row span:nth-child(2) {
  color: #047857;
  background: #d1fae5;
}

.pill-row span:nth-child(3) {
  color: #c2410c;
  background: #ffedd5;
}

.pill-row span:nth-child(4) {
  color: #6d28d9;
  background: #ede9fe;
}

.detail-tags {
  margin-bottom: 22px;
}

.detail-card h2 {
  margin-top: 0;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 14px;
  color: var(--gray-700);
  font-size: 16px;
  line-height: 1.85;
}

.lead-text {
  font-weight: 700;
}

.sticky-card {
  position: sticky;
  top: 92px;
}

.mobile-related-block {
  display: none;
}

.movie-card-compact .movie-info h3 {
  min-height: auto;
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: #0f172a;
}

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

.footer-brand {
  color: var(--white);
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 560px;
  margin: 14px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 12px 18px;
}

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

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.58);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[hidden] {
  display: none !important;
}

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

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

  .ranking-panel,
  .sticky-card {
    position: static;
  }

  .detail-sidebar {
    display: none;
  }

  .mobile-related-block {
    display: block;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 560px;
  }

  .section-head,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-field {
    min-width: 0;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .brand-name {
    font-size: 20px;
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

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

  .hero-actions {
    display: grid;
  }

  .content-section {
    padding: 48px 0;
  }

  .category-grid,
  .four-cols,
  .three-cols {
    grid-template-columns: 1fr;
  }

  .movie-info h3 {
    min-height: auto;
  }

  .mini-card {
    grid-template-columns: 96px 1fr;
  }

  .player-section {
    padding-top: 18px;
  }

  .player-shell {
    border-radius: 14px;
  }

  .detail-card,
  .sidebar-card {
    padding: 20px;
  }
}
