:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --orange-500: #f97316;
  --green-500: #22c55e;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.95);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  height: 70px;
  margin: 0 auto;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue-600);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
  font-size: 15px;
}

.nav-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex: 1;
}

.main-nav,
.quick-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.quick-nav {
  gap: 10px;
}

.main-nav a {
  color: var(--gray-700);
  font-weight: 700;
  transition: color 0.2s ease;
}

.quick-nav a {
  padding: 7px 12px;
  color: var(--blue-700);
  background: var(--blue-50);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.quick-nav a:hover {
  color: var(--blue-600);
}

.quick-nav a:hover {
  background: var(--blue-100);
}

.top-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
}

.top-search input,
.filter-input,
.select-sort {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  outline: none;
  background: #ffffff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  height: 42px;
  padding: 0 76px 0 16px;
}

.top-search input:focus,
.filter-input:focus,
.select-sort:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.top-search button {
  position: absolute;
  right: 5px;
  height: 32px;
  padding: 0 14px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: var(--blue-600);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--blue-50);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--blue-700);
  border-radius: 99px;
}

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

.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: linear-gradient(120deg, var(--blue-900), var(--blue-700));
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  transform: scale(1.04);
}

.hero-slide.is-active img {
  animation: heroZoom 7s ease forwards;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 25%, rgba(96, 165, 250, 0.3), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(30, 64, 175, 0.58), rgba(15, 23, 42, 0.3));
}

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

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  color: #ffffff;
  background: rgba(59, 130, 246, 0.9);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

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

.hero p {
  max-width: 620px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
}

.hero-actions,
.section-head,
.filter-bar,
.detail-meta,
.breadcrumb,
.tag-row,
.movie-meta,
.player-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.btn-primary {
  color: var(--blue-700);
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn-blue {
  color: #ffffff;
  background: var(--blue-600);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.16);
}

.hero-arrow,
.hero-dot {
  position: absolute;
  z-index: 4;
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  top: 50%;
  width: 44px;
  height: 44px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  position: static;
  width: 9px;
  height: 9px;
  padding: 0;
  background: rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.main-space {
  padding: 54px 0;
}

.section-block {
  margin-bottom: 58px;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

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

.section-title b {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange-500), #fb7185);
  border-radius: 14px;
}

.section-title h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

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

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

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

.two-col-grid {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
}

.movie-card,
.panel,
.category-card,
.search-panel,
.detail-card {
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-600));
}

.poster-link img,
.wide-poster img,
.related-poster img,
.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover img,
.wide-card:hover img,
.related-card:hover img,
.category-card:hover .category-thumbs img {
  transform: scale(1.08);
}

.duration,
.play-badge,
.wide-poster em {
  position: absolute;
  z-index: 2;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.duration,
.wide-poster em {
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
}

.play-badge {
  left: 10px;
  bottom: 10px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-600);
}

.movie-info {
  padding: 18px;
}

.movie-meta {
  justify-content: space-between;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 700;
}

.movie-meta a {
  color: var(--blue-700);
  background: var(--blue-50);
  border-radius: 999px;
  padding: 4px 9px;
}

.movie-card h3 {
  min-height: 56px;
  margin: 13px 0 8px;
  font-size: 20px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.wide-card:hover strong,
.rank-list a:hover,
.related-card:hover strong {
  color: var(--blue-600);
}

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

.tag-row span {
  display: inline-flex;
  padding: 4px 9px;
  color: var(--gray-700);
  background: var(--gray-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.category-card {
  position: relative;
  min-height: 245px;
  overflow: hidden;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h3 {
  position: relative;
  z-index: 2;
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  position: relative;
  z-index: 2;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.88);
}

.category-card span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  padding: 9px 14px;
  color: var(--blue-700);
  background: #ffffff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.category-thumbs {
  position: absolute;
  right: -18px;
  bottom: -12px;
  display: flex;
  gap: 8px;
  transform: rotate(-8deg);
  opacity: 0.32;
}

.category-thumbs img {
  width: 88px;
  height: 118px;
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
}

.wide-list {
  display: grid;
  gap: 18px;
}

.wide-card {
  display: flex;
  gap: 18px;
  padding: 14px;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.wide-poster {
  position: relative;
  flex: 0 0 180px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--blue-900);
  border-radius: 14px;
}

.wide-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}

.wide-body strong {
  font-size: 20px;
  transition: color 0.2s ease;
}

.wide-body small,
.wide-body span {
  color: var(--gray-600);
}

.panel {
  padding: 22px;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--gray-100);
}

.rank-list li:last-child {
  border-bottom: 0;
}

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

.rank-list a {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list em {
  color: var(--gray-500);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.page-hero {
  padding: 58px 0 34px;
  background:
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.18), transparent 28%),
    linear-gradient(180deg, #ffffff, var(--gray-50));
}

.page-title {
  max-width: 760px;
}

.filter-card,
.search-panel {
  margin-bottom: 28px;
  padding: 20px;
}

.filter-bar {
  justify-content: space-between;
}

.filter-input {
  max-width: 380px;
  padding: 12px 18px;
  border-radius: 14px;
}

.select-sort {
  width: auto;
  min-width: 150px;
  padding: 12px 18px;
  border-radius: 14px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--gray-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue-700);
  font-weight: 700;
}

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

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
  border-radius: var(--radius);
  background: #000000;
  box-shadow: var(--shadow);
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.68));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  padding-left: 6px;
  color: var(--blue-700);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  font-size: 34px;
}

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

.detail-title h1 {
  margin-bottom: 16px;
}

.detail-meta {
  margin-bottom: 20px;
  color: var(--gray-600);
  font-weight: 700;
}

.detail-meta span {
  padding: 7px 11px;
  background: var(--gray-100);
  border-radius: 999px;
}

.detail-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-section h2::before {
  content: "";
  width: 5px;
  height: 25px;
  background: var(--blue-600);
  border-radius: 99px;
}

.detail-section p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
}

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

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

.related-card {
  display: flex;
  gap: 12px;
}

.related-poster {
  position: relative;
  flex: 0 0 118px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--blue-900);
  border-radius: 12px;
}

.related-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.35;
}

.related-card small {
  color: var(--gray-500);
}

.search-results-note {
  margin: 0 0 22px;
  color: var(--gray-600);
}

.empty-state {
  padding: 70px 24px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--gray-600);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 34px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.footer-brand {
  color: #ffffff;
}

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

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

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--gray-300);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  text-align: center;
  color: var(--gray-500);
}

@keyframes heroZoom {
  from {
    transform: scale(1.03);
  }
  to {
    transform: scale(1.1);
  }
}

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

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    height: auto;
    min-height: 64px;
    padding: 10px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-panel {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

  .nav-panel.is-open {
    display: flex;
  }

  .main-nav,
  .quick-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .main-nav a,
  .quick-nav a {
    padding: 10px 12px;
    background: var(--gray-50);
    border-radius: 12px;
  }

  .top-search {
    width: 100%;
  }

  .hero {
    height: 560px;
  }

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

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

  .hero-arrow {
    display: none;
  }

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

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

  .filter-input,
  .select-sort {
    max-width: none;
    width: 100%;
  }
}

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

  .brand {
    font-size: 18px;
  }

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

  .main-space {
    padding: 36px 0;
  }

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

  .wide-card {
    flex-direction: column;
  }

  .wide-poster {
    flex-basis: auto;
  }

  .detail-card {
    padding: 22px;
  }

  .related-poster {
    flex-basis: 104px;
  }
}
