:root {
  --color-blue-900: #0f2f6f;
  --color-blue-800: #1e40af;
  --color-blue-700: #1d4ed8;
  --color-blue-600: #2563eb;
  --color-blue-100: #dbeafe;
  --color-orange-600: #ea580c;
  --color-orange-500: #f97316;
  --color-orange-100: #ffedd5;
  --color-gray-950: #030712;
  --color-gray-900: #111827;
  --color-gray-800: #1f2937;
  --color-gray-700: #374151;
  --color-gray-600: #4b5563;
  --color-gray-500: #6b7280;
  --color-gray-300: #d1d5db;
  --color-gray-200: #e5e7eb;
  --color-gray-100: #f3f4f6;
  --color-gray-50: #f9fafb;
  --color-white: #ffffff;
  --shadow-card: 0 10px 24px rgba(15, 23, 42, 0.08);
  --shadow-card-hover: 0 22px 44px rgba(15, 23, 42, 0.16);
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-gray-800);
  background: var(--color-gray-50);
  font-family: 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,
video {
  display: block;
  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: 100;
  color: var(--color-white);
  background: linear-gradient(90deg, var(--color-blue-600), var(--color-blue-800));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.86;
}

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: var(--color-white);
  background: var(--color-orange-500);
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.35);
}

.logo-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.logo-text span {
  display: block;
  margin-top: 3px;
  color: var(--color-blue-100);
  font-size: 12px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 600;
}

.primary-nav a {
  padding: 8px 0;
  transition: color 0.2s ease;
}

.primary-nav a:hover,
.primary-nav a.active {
  color: #fdba74;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 32vw);
}

.header-search input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.header-search button,
.nav-toggle {
  border: 0;
  cursor: pointer;
  color: var(--color-white);
  background: transparent;
}

.header-search button {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--color-orange-500);
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover {
  background: var(--color-orange-600);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  font-size: 28px;
}

.mobile-nav {
  display: none;
  padding: 12px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: var(--color-white);
}

.header-search-mobile input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

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

.hero {
  position: relative;
  height: 500px;
  overflow: hidden;
  color: var(--color-white);
  background: linear-gradient(135deg, #0f172a, var(--color-blue-800), #0f172a);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 20%, rgba(249, 115, 22, 0.24), transparent 28%),
    linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.18));
}

.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #fde68a;
  font-weight: 800;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-description {
  max-width: 620px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: 18px;
}

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

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

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

.hero-dot.active {
  width: 32px;
  background: var(--color-orange-500);
}

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

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

.btn-primary {
  color: var(--color-white);
  background: var(--color-orange-500);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.28);
}

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

.btn-ghost {
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.main-content {
  padding: 48px 0 64px;
}

.section {
  margin-bottom: 60px;
}

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

.section-title {
  margin: 0;
  color: var(--color-gray-900);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.18;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--color-gray-500);
}

.link-more {
  color: var(--color-blue-700);
  font-weight: 800;
  white-space: nowrap;
}

.link-more:hover {
  color: var(--color-orange-600);
}

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

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

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

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

.movie-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-blue-900), var(--color-gray-900));
}

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

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

.movie-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s ease;
}

.movie-card:hover .movie-poster::after {
  background: rgba(0, 0, 0, 0.32);
}

.card-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: var(--color-white);
  font-size: 48px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.badge,
.year-badge {
  position: absolute;
  z-index: 4;
  top: 10px;
  max-width: calc(100% - 20px);
  border-radius: 8px;
  padding: 3px 8px;
  color: var(--color-white);
  font-size: 12px;
  font-weight: 800;
}

.badge {
  left: 10px;
  background: var(--color-orange-500);
}

.year-badge {
  right: 10px;
  background: rgba(0, 0, 0, 0.72);
}

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

.movie-card-title {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--color-gray-800);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card:hover .movie-card-title {
  color: var(--color-orange-600);
}

.movie-card-meta {
  display: -webkit-box;
  min-height: 20px;
  margin: 0;
  overflow: hidden;
  color: var(--color-gray-500);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.category-panel {
  border-radius: var(--radius-2xl);
  padding: 28px;
  background: linear-gradient(90deg, #ecfdf5, #eff6ff);
}

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

.category-card {
  display: block;
  border-radius: 18px;
  padding: 22px;
  background: var(--color-white);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 14px;
  color: var(--color-white);
  font-weight: 900;
}

.category-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

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

.cat-red { background: #ef4444; }
.cat-blue { background: #2563eb; }
.cat-orange { background: #f97316; }
.cat-purple { background: #8b5cf6; }
.cat-pink { background: #ec4899; }
.cat-cyan { background: #06b6d4; }
.cat-indigo { background: #6366f1; }
.cat-green { background: #22c55e; }
.cat-yellow { background: #eab308; }
.cat-teal { background: #14b8a6; }
.cat-rose { background: #f43f5e; }
.cat-sky { background: #0ea5e9; }

.stats-band {
  border-radius: var(--radius-2xl);
  padding: 36px;
  color: var(--color-white);
  text-align: center;
  background: linear-gradient(135deg, var(--color-orange-500), #dc2626);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 760px;
  margin: 26px auto 0;
}

.stat-number {
  display: block;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
}

.stat-label {
  color: #ffedd5;
}

.page-hero {
  color: var(--color-white);
  background: linear-gradient(90deg, var(--color-blue-600), var(--color-blue-800));
}

.page-hero.alt {
  background: linear-gradient(90deg, var(--color-blue-600), var(--color-orange-600));
}

.page-hero-inner {
  padding: 52px 0;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.12;
}

.page-hero p {
  margin: 0;
  color: var(--color-blue-100);
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 28px;
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

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

.filter-field input,
.filter-field select,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid var(--color-gray-200);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--color-white);
  outline: none;
}

.filter-field input:focus,
.filter-field select:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--color-blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.filter-count {
  padding: 10px 12px;
  color: var(--color-gray-500);
  font-weight: 800;
  white-space: nowrap;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 70px 1fr auto;
  gap: 16px;
  align-items: center;
  border-radius: var(--radius-lg);
  padding: 12px;
  background: var(--color-white);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.rank-number {
  color: var(--color-orange-500);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  overflow: hidden;
  width: 70px;
  height: 92px;
  border-radius: 10px;
  background: var(--color-gray-900);
}

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

.rank-title {
  margin: 0 0 6px;
  color: var(--color-gray-900);
  font-size: 18px;
  font-weight: 900;
}

.rank-desc {
  margin: 0;
  color: var(--color-gray-500);
  font-size: 14px;
}

.rank-score {
  min-width: 90px;
  color: var(--color-blue-700);
  font-weight: 900;
  text-align: right;
}

.detail-hero {
  color: var(--color-white);
  background: var(--color-gray-900);
}

.detail-hero-inner {
  padding: 32px 0;
}

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

.breadcrumb a:hover {
  color: #fdba74;
}

.detail-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.16;
}

.detail-hero p {
  max-width: 900px;
  margin: 10px 0 0;
  color: var(--color-gray-300);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.88fr);
  gap: 28px;
}

.panel {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.panel-body {
  padding: 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000000;
}

.video-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-loading,
.video-error,
.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--color-white);
  text-align: center;
}

.video-loading {
  pointer-events: none;
  background: rgba(0, 0, 0, 0.52);
}

.video-loading[hidden],
.video-error[hidden],
.video-overlay[hidden] {
  display: none;
}

.spinner {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--color-orange-500);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.video-error {
  padding: 20px;
  background: rgba(0, 0, 0, 0.76);
}

.video-overlay {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.18));
}

.play-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--color-white);
  background: var(--color-orange-500);
  font-size: 34px;
  box-shadow: 0 16px 40px rgba(249, 115, 22, 0.42);
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
  transform: scale(1.06);
  background: var(--color-orange-600);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 700;
}

.meta-pill {
  color: var(--color-gray-600);
  background: var(--color-gray-100);
}

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

.tag-pill.primary {
  color: #1e40af;
  background: #dbeafe;
}

.tag-pill.genre {
  color: #6d28d9;
  background: #ede9fe;
}

.content-block {
  border-top: 1px solid var(--color-gray-200);
  padding-top: 22px;
  margin-top: 20px;
}

.content-block h2,
.content-block h3 {
  margin: 0 0 12px;
  color: var(--color-gray-900);
}

.content-block p {
  margin: 0;
  color: var(--color-gray-700);
}

.sidebar-poster {
  width: 100%;
  border-radius: var(--radius-lg);
  background: var(--color-gray-900);
}

.sidebar-list {
  display: grid;
  gap: 12px;
}

.sidebar-link {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
}

.sidebar-link img {
  width: 58px;
  height: 76px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--color-gray-900);
}

.sidebar-link strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-gray-900);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sidebar-link span {
  display: block;
  margin-top: 4px;
  color: var(--color-gray-500);
  font-size: 12px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: 12px;
  margin-bottom: 28px;
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.sitemap-list {
  columns: 4 220px;
  column-gap: 34px;
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.sitemap-list a {
  display: block;
  break-inside: avoid;
  padding: 6px 0;
  color: var(--color-gray-700);
}

.sitemap-list a:hover {
  color: var(--color-orange-600);
}

.text-page {
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.text-page h2,
.text-page h3 {
  color: var(--color-gray-900);
}

.site-footer {
  color: var(--color-gray-300);
  background: var(--color-gray-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 28px;
  padding: 46px 0 34px;
}

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

.footer-grid p,
.footer-grid a {
  color: var(--color-gray-300);
  font-size: 14px;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
}

.footer-grid a:hover {
  color: #fdba74;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 22px 0 30px;
  color: var(--color-gray-500);
  text-align: center;
  font-size: 13px;
}

.hidden-by-filter {
  display: none !important;
}

.empty-state {
  display: none;
  border-radius: var(--radius-lg);
  padding: 48px;
  color: var(--color-gray-500);
  text-align: center;
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.empty-state.visible {
  display: block;
}

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

  .nav-toggle {
    display: block;
  }

  .mobile-nav.open {
    display: block;
  }

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

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

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

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

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

  .logo-text span {
    display: none;
  }

  .hero {
    height: 540px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 78px;
  }

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

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

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

  .movie-grid,
  .movie-grid.grid-compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 58px 1fr;
  }

  .rank-score {
    grid-column: 2 / -1;
    min-width: auto;
    text-align: left;
  }

  .rank-cover {
    width: 58px;
    height: 78px;
  }

  .panel-body {
    padding: 18px;
  }
}
