:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --pink: #ec4899;
  --red: #ef4444;
  --orange: #f97316;
  --blue: #3b82f6;
  --green: #10b981;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #fff1f7 0%, #eff6ff 52%, #ecfdf5 100%);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 76px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.28);
}

.brand-text,
.footer-brand span:last-child {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 24px;
  line-height: 1;
  background: linear-gradient(90deg, #dc2626, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small,
.footer-brand small {
  color: var(--muted);
  font-size: 12px;
}

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

.desktop-nav a,
.nav-dropdown button,
.mobile-nav a {
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-dropdown button:hover,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--pink);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 8px;
  width: 250px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.22s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  padding: 9px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff7fb, #eff6ff);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.site-search {
  position: relative;
  display: flex;
  overflow: hidden;
  width: min(320px, 34vw);
  border: 1px solid #fbcfe8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.site-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 11px 14px;
  background: transparent;
  color: var(--ink);
}

.site-search button {
  border: 0;
  padding: 0 18px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(90deg, var(--pink), var(--blue));
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  font-size: 22px;
  background: linear-gradient(135deg, var(--pink), var(--blue));
}

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

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s 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.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 620px;
  padding: 76px 0 110px;
  color: #ffffff;
}

.hero-text {
  width: min(680px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #f9a8d4;
  font-weight: 800;
}

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

.hero p {
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.card-meta-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.btn-primary,
.empty-link {
  color: #ffffff;
  background: linear-gradient(90deg, var(--pink), var(--blue));
  box-shadow: 0 18px 34px rgba(236, 72, 153, 0.26);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-more:hover,
.empty-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(59, 130, 246, 0.22);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 72px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

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

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

.hero-fade {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 140px;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.section {
  padding: 58px 0;
}

.section.soft {
  background: linear-gradient(90deg, #fff1f7 0%, #eff6ff 52%, #ecfdf5 100%);
}

.section.white {
  background: #ffffff;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.section-head h2 span {
  display: grid;
  width: 7px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  color: transparent;
  background: linear-gradient(180deg, var(--pink), var(--blue));
}

.section-more {
  min-height: 38px;
  color: var(--pink);
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

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

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

.movie-card {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(236, 72, 153, 0.34);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #fee2e2, #dbeafe);
}

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

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

.badge,
.duration {
  position: absolute;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 9px;
  color: #ffffff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.badge {
  top: 10px;
  left: 10px;
  background: var(--pink);
}

.duration {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.72);
}

.play-dot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 38px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.28);
  transition: opacity 0.24s ease;
}

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

.card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.card-body strong {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body small,
.desc,
.meta-row span {
  color: var(--muted);
}

.desc {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.meta-row b {
  color: #eab308;
  font-size: 16px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 24px;
}

.tag-row span {
  padding: 3px 8px;
  border-radius: 999px;
  color: #be185d;
  font-size: 12px;
  background: #fce7f3;
}

.movie-card.horizontal {
  grid-template-columns: 164px 1fr;
  align-items: stretch;
}

.movie-card.horizontal .poster {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card.horizontal .card-body strong {
  min-height: 0;
}

.rank-num {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 12px 25px rgba(239, 68, 68, 0.28);
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff7fb, #eff6ff);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-tile b {
  display: block;
  margin-bottom: 9px;
  font-size: 22px;
}

.category-tile small {
  color: var(--muted);
}

.page-hero {
  padding: 62px 0;
  color: #ffffff;
  background: linear-gradient(90deg, var(--pink), var(--blue));
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4.5vw, 54px);
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.75;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr repeat(3, minmax(150px, 200px));
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 13px;
  outline: 0;
  padding: 12px 14px;
  color: var(--ink);
  background: #f9fafb;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  padding: 34px 0 64px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.54));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 999px;
  font-size: 44px;
  text-indent: 6px;
  background: linear-gradient(135deg, var(--pink), var(--blue));
  box-shadow: 0 20px 44px rgba(236, 72, 153, 0.32);
}

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

.detail-card,
.side-card {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

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

.detail-card h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
}

.detail-meta span {
  color: #374151;
  background: #f3f4f6;
}

.detail-card h2,
.side-card h2 {
  margin: 26px 0 12px;
  font-size: 22px;
}

.detail-card p {
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

.detail-cover {
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 18px;
}

.side-card {
  padding: 18px;
}

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

.side-list .movie-card.horizontal {
  grid-template-columns: 104px 1fr;
  border-radius: 15px;
  box-shadow: none;
}

.side-list .card-body {
  padding: 11px;
}

.side-list .card-body strong {
  font-size: 15px;
}

.breadcrumb {
  padding: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.search-results-info {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: 16px;
  color: #1d4ed8;
  background: #dbeafe;
}

.empty-state {
  padding: 56px 18px;
  border-radius: 22px;
  text-align: center;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.empty-state p {
  margin-bottom: 22px;
  color: var(--muted);
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(90deg, #111827, #1f2937);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 36px;
  padding: 48px 0;
}

.footer-brand strong {
  color: #ffffff;
  font-size: 20px;
}

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

.site-footer p {
  margin: 0;
  color: #9ca3af;
  line-height: 1.75;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  text-align: center;
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-search {
    width: min(420px, 48vw);
  }

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

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

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

@media (max-width: 760px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 0;
  }

  .brand-text strong {
    font-size: 20px;
  }

  .header-actions {
    width: 100%;
  }

  .site-search {
    width: auto;
    flex: 1;
  }

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

  .hero-content {
    padding: 52px 0 88px;
  }

  .hero-controls {
    right: 24px;
    bottom: 44px;
  }

  .section {
    padding: 42px 0;
  }

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

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

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

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

  .movie-card.horizontal {
    grid-template-columns: 120px 1fr;
  }

  .card-body {
    padding: 13px;
  }

  .card-body strong {
    min-height: 42px;
    font-size: 16px;
  }
}

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

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

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

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

  .movie-card.horizontal,
  .side-list .movie-card.horizontal {
    grid-template-columns: 112px 1fr;
  }
}
