* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.locked {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.logo-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
  font-size: 14px;
}

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

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #0369a1;
  background: #e0f2fe;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 12px;
  padding: 9px 12px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid #e5e7eb;
  padding: 12px 24px 18px;
  background: #ffffff;
}

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

.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.mobile-cats a {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0369a1;
  font-size: 13px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: #020617;
}

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

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

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

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 600px;
  margin: 0 auto;
  padding: 78px 24px 92px;
  display: flex;
  align-items: center;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(2, 132, 199, 0.86);
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.24);
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(36px, 7vw, 70px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  color: #ffffff;
  background: #0284c7;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.24);
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: #0369a1;
  box-shadow: 0 16px 34px rgba(2, 132, 199, 0.3);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.btn.light {
  color: #0369a1;
  background: #e0f2fe;
  box-shadow: none;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.2s ease;
}

.hero-dot.active {
  width: 32px;
  background: #38bdf8;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.quick-search {
  position: relative;
  z-index: 10;
  max-width: 1180px;
  margin: -44px auto 32px;
  padding: 0 24px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px auto;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
}

.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid #dbeafe;
  border-radius: 15px;
  padding: 12px 14px;
  outline: none;
  color: #0f172a;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.main-wrap,
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px;
}

.section-block {
  margin: 0 0 62px;
}

.section-head,
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 24px;
}

.section-head h2,
.page-head h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-head p,
.page-head p {
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.7;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0f172a, #0284c7);
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.66));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-badge,
.year-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) scale(0.86);
  background: rgba(255, 255, 255, 0.9);
  color: #0284c7;
  opacity: 0;
  transition: all 0.25s ease;
}

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

.year-badge {
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  background: rgba(2, 132, 199, 0.92);
  font-size: 12px;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-title:hover {
  color: #0284c7;
}

.card-desc {
  display: -webkit-box;
  min-height: 45px;
  margin: 8px 0 12px;
  overflow: hidden;
  color: #64748b;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #475569;
  font-size: 13px;
}

.card-meta span,
.card-meta a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: #f1f5f9;
}

.card-meta a {
  color: #0369a1;
  background: #e0f2fe;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  color: #0369a1;
  background: #eff6ff;
  font-size: 12px;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 60px;
}

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border-radius: 22px;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  box-shadow: 0 15px 32px rgba(37, 99, 235, 0.2);
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #059669, #0284c7);
}

.category-tile h3 {
  position: relative;
  margin: 0 0 8px;
  font-size: 22px;
}

.category-tile p {
  position: relative;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.6;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -28px;
  bottom: -28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 128px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 12px;
  background: #ffffff;
  transition: all 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  background: #e0f2fe;
}

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

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-info p {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0369a1;
}

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

.detail-main,
.detail-side,
.info-card {
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.detail-main {
  overflow: hidden;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #020617;
}

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

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

.big-play {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #0284c7;
  background: rgba(255, 255, 255, 0.92);
  font-size: 28px;
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.3);
}

.detail-content {
  padding: 26px;
}

.detail-title {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.detail-lead {
  color: #475569;
  font-size: 18px;
  line-height: 1.8;
}

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

.meta-box {
  border-radius: 16px;
  padding: 13px;
  background: #f8fafc;
}

.meta-box small {
  display: block;
  color: #64748b;
  margin-bottom: 5px;
}

.meta-box strong {
  color: #0f172a;
}

.text-section {
  margin-top: 26px;
  border-top: 1px solid #e5e7eb;
  padding-top: 24px;
}

.text-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.text-section p {
  margin: 0 0 14px;
  color: #374151;
  line-height: 1.85;
}

.detail-side {
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 86px;
}

.side-title {
  margin: 0 0 16px;
  font-size: 22px;
}

.side-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

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

.side-card img {
  width: 112px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
}

.side-card h3 {
  margin: 0 0 6px;
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #1d4ed8);
  padding: 58px 24px;
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #e0f2fe;
  font-size: 18px;
  line-height: 1.75;
}

.pagination-note {
  margin: 24px 0 0;
  color: #64748b;
  text-align: center;
}

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

.site-footer {
  margin-top: 50px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  color: #ffffff;
  margin-bottom: 14px;
}

.footer-grid p {
  margin: 10px 0 0;
  color: #94a3b8;
  line-height: 1.7;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: #38bdf8;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding: 18px 24px;
  text-align: center;
  color: #94a3b8;
}

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

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

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

  .detail-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

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

  .movie-grid,
  .rank-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .hero-content,
  .main-wrap,
  .page-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .rank-item {
    grid-template-columns: 42px 96px 1fr;
  }

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

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