:root {
  --sky: #0ea5e9;
  --sky-dark: #0284c7;
  --blue: #2563eb;
  --text: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 60%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #0ea5e9 0%, #2563eb 100%);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.24);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--sky);
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
}

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

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

.nav-link,
.mobile-nav-link {
  position: relative;
  opacity: 0.94;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  opacity: 1;
}

.nav-link.active::after,
.nav-link:hover::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  content: "";
  background: #ffffff;
  border-radius: 999px;
}

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

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #ffffff;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

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

.mobile-nav-link {
  padding: 11px 14px;
  border-radius: 12px;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: rgba(255, 255, 255, 0.12);
}

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

.hero {
  position: relative;
  height: min(78vh, 600px);
  min-height: 420px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.55) 42%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding-bottom: 72px;
}

.hero-copy {
  max-width: 740px;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 7px 14px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.35);
  border: 1px solid rgba(224, 242, 254, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.05;
  font-weight: 900;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

.hero p {
  max-width: 660px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.7;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.primary-button,
.ghost-button,
.section-more a,
.side-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.section-more a,
.side-button {
  color: #ffffff;
  background: var(--sky);
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.28);
}

.primary-button:hover,
.section-more a:hover,
.side-button:hover {
  transform: translateY(-2px);
  background: var(--sky-dark);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.24);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 34px;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.68);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.intro-search {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 460px);
  gap: 28px;
  align-items: center;
  margin-top: 36px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.intro-search h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 34px);
}

.intro-search p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.home-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: #f3f4f6;
  border-radius: 999px;
}

.home-search input {
  flex: 1;
  min-width: 0;
  padding: 0 16px;
  background: transparent;
  border: 0;
  outline: 0;
}

.home-search button {
  padding: 12px 22px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--sky), var(--blue));
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.home-section,
.listing-section,
.category-overview,
.ranking-layout,
.detail-wrap {
  padding: 52px 0;
}

.section-title {
  margin-bottom: 24px;
}

.section-heading-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  border-radius: 12px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
}

.section-title p {
  margin: 8px 0 0 46px;
  color: var(--muted);
}

.section-underline {
  display: block;
  width: 88px;
  height: 4px;
  margin: 14px 0 0 46px;
  background: linear-gradient(90deg, var(--sky), var(--blue));
  border-radius: 999px;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
}

.poster-link,
.horizontal-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

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

.poster-link img,
.horizontal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent 58%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-circle,
.play-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.92);
  border-radius: 999px;
  opacity: 0;
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.45);
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-badge,
.region-badge {
  position: absolute;
  z-index: 2;
  padding: 4px 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.year-badge {
  top: 10px;
  right: 10px;
}

.region-badge {
  left: 10px;
  bottom: 10px;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--sky-dark);
}

.card-body p,
.horizontal-info p {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list.compact span {
  padding: 3px 8px;
  font-size: 11px;
}

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

.category-tile,
.category-preview-block {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.category-tile {
  min-height: 230px;
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-glow {
  position: absolute;
  right: -40px;
  top: -40px;
  width: 130px;
  height: 130px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.25), transparent 70%);
}

.category-tile h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.category-tile p,
.category-preview-head p {
  color: var(--muted);
  line-height: 1.7;
}

.category-tile div {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  color: #0369a1;
  font-size: 13px;
  font-weight: 700;
}

.section-more {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

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

.gradient-page-hero {
  color: #ffffff;
  background: linear-gradient(100deg, #0ea5e9 0%, #2563eb 70%, #1d4ed8 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 12px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 999px;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #e0f2fe;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.88);
}

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

.category-preview-block {
  margin-bottom: 32px;
  padding: 26px;
}

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

.category-preview-head h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.category-preview-head a {
  flex: 0 0 auto;
  padding: 10px 18px;
  color: #ffffff;
  background: var(--sky);
  border-radius: 999px;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 26px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  padding: 0 14px;
  color: #111827;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}

.filter-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.empty-state {
  display: none;
  padding: 48px 0;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

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

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

.ranking-list {
  display: grid;
  gap: 16px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  min-height: 210px;
}

.horizontal-cover {
  height: 100%;
}

.horizontal-info {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 22px;
}

.rank-num {
  position: absolute;
  top: 16px;
  right: 18px;
  color: rgba(14, 165, 233, 0.12);
  font-size: 42px;
  line-height: 1;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 6px 0 12px;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.ranking-side {
  position: sticky;
  top: 96px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.side-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-wrap {
  padding-top: 34px;
}

.detail-breadcrumb {
  margin: 0 0 20px;
  color: #667085;
}

.detail-breadcrumb a:hover {
  color: var(--sky-dark);
}

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

.player-card {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.12));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding-left: 5px;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.94);
  border-radius: 999px;
  box-shadow: 0 20px 40px rgba(14, 165, 233, 0.4);
  font-size: 34px;
}

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

.detail-panel,
.info-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.detail-panel {
  margin-top: 24px;
  padding: 28px;
}

.detail-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
}

.detail-panel h2,
.info-card h2 {
  margin: 28px 0 12px;
  font-size: 20px;
}

.detail-panel h2:first-of-type,
.info-card h2 {
  margin-top: 0;
}

.detail-panel p {
  color: #374151;
  line-height: 1.9;
}

.one-line {
  color: #111827;
  font-size: 18px;
  font-style: italic;
}

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

.detail-meta span {
  padding: 6px 10px;
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.detail-tags {
  margin: 18px 0 28px;
}

.detail-side {
  position: sticky;
  top: 96px;
}

.info-card {
  padding: 24px;
}

.info-card dl {
  display: grid;
  gap: 14px;
  margin: 0 0 24px;
}

.info-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-card dt {
  color: #667085;
}

.info-card dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.related-section {
  margin-top: 52px;
}

.site-footer {
  margin-top: 30px;
  color: #d1d5db;
  background: #111827;
}

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

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

.site-footer p {
  max-width: 420px;
  margin: 0;
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

.site-footer a {
  display: block;
  margin: 9px 0;
  color: #d1d5db;
}

.site-footer a:hover {
  color: #7dd3fc;
}

.footer-bottom {
  padding: 18px 0 28px;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

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

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

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

  .ranking-side,
  .detail-side {
    position: static;
  }
}

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

  .menu-button {
    display: block;
  }

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

  .hero {
    min-height: 520px;
  }

  .hero-content {
    padding-bottom: 82px;
  }

  .hero-arrow {
    top: auto;
    bottom: 22px;
    width: 40px;
    height: 40px;
    font-size: 28px;
    transform: none;
  }

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

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

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

  .home-search {
    border-radius: 18px;
    flex-direction: column;
  }

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

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

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

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

  .category-preview-head {
    display: grid;
  }

  .horizontal-card {
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 168px;
  }

  .horizontal-info {
    padding: 14px;
  }

  .rank-num {
    display: none;
  }

  .detail-panel,
  .info-card,
  .category-preview-block {
    padding: 20px;
  }
}
