:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.13);
  --shadow-card: 0 12px 28px rgba(37, 99, 235, 0.13);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-800);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 45%, #f3f8ff 100%);
  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;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--blue-600), var(--cyan-500));
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.25);
}

.header-inner {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand {
  font-size: 22px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--blue-600);
  background: var(--white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 8px 20px rgba(15, 23, 42, 0.18);
}

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

.nav-link,
.mobile-link {
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 15px;
  color: rgba(255, 255, 255, 0.9);
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
}

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

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

.mobile-nav {
  display: none;
  padding: 8px 16px 16px;
  background: rgba(29, 78, 216, 0.96);
}

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

.mobile-link {
  padding: 10px 13px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: var(--white);
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.55), transparent 32%), linear-gradient(135deg, var(--blue-600), var(--blue-700) 48%, var(--cyan-500));
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  filter: blur(2px);
}

.hero::before {
  width: 520px;
  height: 520px;
  right: -170px;
  top: -120px;
}

.hero::after {
  width: 360px;
  height: 360px;
  left: -120px;
  bottom: -160px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 74px 22px 54px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 44px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--blue-100);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h1 span {
  display: block;
  margin-top: 10px;
  font-size: clamp(26px, 3.2vw, 42px);
  color: var(--blue-200);
}

.hero p {
  max-width: 680px;
  margin: 0 0 30px;
  color: var(--blue-100);
  font-size: 21px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--blue-600);
  background: var(--white);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.18);
}

.button-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
}

.button-blue {
  color: var(--white);
  background: linear-gradient(90deg, var(--blue-600), var(--cyan-500));
  box-shadow: var(--shadow-card);
}

.hero-search {
  max-width: 620px;
  margin-top: 28px;
  padding: 8px;
  display: flex;
  gap: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  border: 0;
  outline: 0;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 0 16px;
  color: var(--white);
  background: transparent;
}

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

.hero-search button {
  border: 0;
}

.hero-showcase {
  position: relative;
  min-height: 470px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-xl);
  opacity: 0;
  transform: scale(0.96) translateY(18px);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.2), rgba(37, 99, 235, 0.38)), var(--poster-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.34);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.78));
}

.hero-slide-content {
  position: relative;
  z-index: 1;
  align-self: end;
  padding: 30px;
}

.hero-slide-content h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.hero-slide-content p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 28px;
  bottom: 24px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  opacity: 0.65;
  cursor: pointer;
  background: var(--white);
}

.hero-dot.active {
  width: 28px;
  opacity: 1;
}

.stats-panel {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 5;
  display: flex;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

.stats-panel strong {
  display: block;
  font-size: 27px;
}

.page-hero,
.section,
.content-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.page-hero {
  padding-top: 58px;
  padding-bottom: 44px;
}

.page-hero h1,
.section-title h2 {
  margin: 0;
  color: var(--gray-900);
  line-height: 1.12;
}

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

.page-hero p,
.section-title p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--gray-500);
}

.section {
  padding-top: 48px;
  padding-bottom: 48px;
}

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

.section-title h2 {
  font-size: clamp(26px, 3vw, 38px);
}

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

.movie-card,
.category-card,
.info-card,
.rank-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-card:hover,
.info-card:hover,
.rank-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
}

.card-poster,
.compact-card,
.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background-image: linear-gradient(135deg, rgba(37, 99, 235, 0.78), rgba(6, 182, 212, 0.72)), var(--poster-image);
  background-size: cover;
  background-position: center;
}

.card-poster {
  aspect-ratio: 3 / 4;
}

.poster-shine,
.compact-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.68));
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--blue-600);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.92);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.card-poster:hover .play-badge,
.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.score-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--white);
  font-weight: 800;
  background: rgba(15, 23, 42, 0.72);
}

.card-content {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--blue-600);
  font-size: 13px;
  font-weight: 700;
}

.card-content h3 {
  margin: 9px 0 8px;
  color: var(--gray-900);
  font-size: 20px;
  line-height: 1.25;
}

.card-content h3 a:hover,
.rank-title:hover,
.text-link:hover {
  color: var(--blue-600);
}

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

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

.tag-row span,
.detail-tag,
.category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 700;
  background: var(--blue-50);
}

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

.compact-card {
  min-height: 180px;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

.compact-title,
.compact-meta {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 1;
  color: var(--white);
}

.compact-title {
  bottom: 42px;
  font-size: 19px;
  font-weight: 800;
}

.compact-meta {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

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

.category-card {
  padding: 22px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  color: var(--gray-900);
}

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

.category-count {
  color: var(--blue-600);
  font-weight: 900;
}

.filter-bar {
  position: sticky;
  top: 78px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 150px;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(219, 234, 254, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  color: var(--gray-700);
  background: var(--gray-50);
}

.rank-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--gray-200);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.rank-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.rank-table th,
.rank-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--gray-100);
  text-align: left;
}

.rank-table th {
  color: var(--blue-700);
  font-size: 13px;
  background: var(--blue-50);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
}

.rank-title {
  display: block;
  color: var(--gray-900);
  font-weight: 800;
}

.rank-desc {
  display: block;
  max-width: 640px;
  color: var(--gray-500);
  font-size: 13px;
}

.detail-hero {
  color: var(--white);
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.42), transparent 34%), linear-gradient(135deg, var(--blue-700), #172554 60%, #083344);
}

.detail-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 50px 22px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.34);
}

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

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

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
}

.detail-lead {
  max-width: 860px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 19px;
}

.detail-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
}

.player-card,
.detail-section,
.side-panel {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
}

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

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: var(--white);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.28), rgba(37, 99, 235, 0.35)), var(--poster-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--blue-600);
  font-size: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.24);
}

.player-caption {
  padding: 20px 24px;
}

.player-caption h2,
.detail-section h2,
.side-panel h2 {
  margin: 0 0 10px;
  color: var(--gray-900);
}

.player-caption p,
.detail-section p,
.side-panel p {
  margin: 0;
  color: var(--gray-500);
}

.detail-section {
  padding: 24px;
  margin-bottom: 24px;
}

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

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

.side-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

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

.side-thumb {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background-image: linear-gradient(135deg, rgba(37, 99, 235, 0.7), rgba(6, 182, 212, 0.65)), var(--poster-image);
  background-size: cover;
  background-position: center;
}

.side-item strong {
  display: block;
  color: var(--gray-900);
  line-height: 1.3;
}

.side-item span {
  color: var(--gray-500);
  font-size: 13px;
}

.no-results {
  display: none;
  padding: 28px;
  border-radius: 18px;
  color: var(--gray-500);
  background: var(--gray-50);
  text-align: center;
}

.no-results.show {
  display: block;
}

.site-footer {
  margin-top: 40px;
  color: #d1d5db;
  background: var(--gray-900);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

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

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

.site-footer p,
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: var(--blue-400);
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 22px 28px;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

  .menu-button {
    display: flex;
  }

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

  .hero-showcase {
    min-height: 430px;
  }

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

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

  .side-panel {
    position: static;
  }

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

@media (max-width: 640px) {
  .header-inner {
    height: 62px;
    padding: 0 16px;
  }

  .brand {
    font-size: 19px;
  }

  .hero-inner {
    padding-top: 44px;
  }

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

  .hero-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .hero-search input {
    min-height: 44px;
  }

  .stats-panel {
    left: 18px;
    right: 18px;
    justify-content: center;
  }

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

  .section-title {
    display: block;
  }

  .detail-copy h1 {
    font-size: 34px;
  }

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