:root {
  --pink: #ec4899;
  --pink-dark: #db2777;
  --purple: #8b5cf6;
  --blue: #3b82f6;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #fff1f7 0%, #f6f0ff 45%, #eff6ff 100%);
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(139, 92, 246, 0.24);
}

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

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

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 14px;
  color: var(--pink);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(255, 255, 255, 0.25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-button {
  border: 0;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 190px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: #ffffff;
  color: var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

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

.dropdown-menu a {
  padding: 9px 12px;
  border-radius: 12px;
  color: #374151;
}

.dropdown-menu a:hover {
  color: var(--pink-dark);
  background: #fdf2f8;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.header-search input,
.mobile-search input,
.wide-search input,
.inline-filter input {
  border: 0;
  outline: 0;
  color: var(--ink);
  background: #ffffff;
}

.header-search input {
  width: 190px;
  padding: 10px 14px;
  border-radius: 999px;
}

.header-search button,
.mobile-search button,
.wide-search button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--pink-dark);
  font-weight: 800;
  padding: 10px 16px;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  padding: 12px 14px;
}

.hero-carousel {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0.56), rgba(17, 24, 39, 0.16)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 610px;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(720px, 100%);
  color: #ffffff;
  padding: 72px 0;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pink-dark);
  background: #fdf2f8;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-kicker {
  color: #ffffff;
  background: var(--pink);
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.42);
}

.hero-copy h1 {
  margin: 20px 0 16px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 660px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.8;
}

.hero-tags,
.movie-tags,
.detail-tags,
.cta-tags,
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.movie-tags span,
.tag,
.cta-tags a,
.category-tabs a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button,
.panel-link,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 14px 26px;
  color: #ffffff;
  background: var(--pink);
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.38);
}

.ghost-button {
  padding: 14px 24px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.panel-link:hover,
.section-more:hover {
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
}

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

.search-strip {
  margin-top: -34px;
  position: relative;
  z-index: 4;
}

.search-strip-inner {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 540px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-strip h2,
.section-heading h2,
.panel-heading h2,
.side-panel h2,
.detail-card h2,
.cta-panel h2 {
  margin: 8px 0 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}

.wide-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

.wide-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border-radius: 999px;
}

.wide-search button {
  padding-inline: 24px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
}

.section-block {
  padding: 74px 0;
}

.compact-section {
  padding-top: 42px;
  padding-bottom: 42px;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-more {
  color: var(--pink-dark);
  gap: 6px;
}

.section-intro {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
  margin: -12px 0 24px;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 26px rgba(17, 24, 39, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 42% 1fr;
}

.movie-card-large .poster {
  aspect-ratio: 16 / 10;
}

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

.poster-wide {
  aspect-ratio: auto;
  min-height: 100%;
}

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

.movie-card:hover .poster img,
.rank-card:hover .rank-poster img,
.mini-card:hover img {
  transform: scale(1.07);
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(17, 24, 39, 0.62));
  opacity: 0;
  transition: opacity 0.24s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: var(--pink);
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  padding: 18px;
}

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
}

.movie-title:hover {
  color: var(--pink-dark);
}

.movie-card-body p,
.rank-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  margin: 10px 0 13px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.movie-tags {
  margin-bottom: 12px;
}

.movie-tags span {
  padding: 5px 9px;
  color: #4b5563;
  background: #f3f4f6;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #f9fafb;
}

.gradient-section {
  background: linear-gradient(90deg, #fce7f3, #ede9fe, #dbeafe);
}

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

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

.category-tile {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72));
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-emoji {
  font-size: 34px;
}

.category-tile strong {
  font-size: 20px;
}

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

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
}

.ranking-panel,
.side-panel,
.detail-card,
.player-card {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
}

.ranking-panel {
  align-self: start;
  position: sticky;
  top: 96px;
  padding: 24px;
}

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

.mini-card {
  position: relative;
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: #f9fafb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  background: #fdf2f8;
  transform: translateX(3px);
}

.mini-card img {
  width: 86px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.mini-card-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mini-card-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card-info small {
  color: var(--muted);
}

.rank-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  font-weight: 900;
}

.panel-link {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--pink), var(--purple));
}

.cta-panel,
.page-hero,
.category-hero {
  border-radius: 32px;
  color: #ffffff;
  background: linear-gradient(100deg, var(--pink), var(--purple), var(--blue));
  box-shadow: var(--shadow);
}

.cta-panel {
  margin-bottom: 74px;
  padding: 44px;
  text-align: center;
}

.cta-panel p {
  max-width: 740px;
  margin: 14px auto 24px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
}

.cta-tags {
  justify-content: center;
}

.cta-tags a,
.category-tabs a,
.tag {
  padding: 8px 12px;
  color: #374151;
  background: #ffffff;
}

.cta-tags a:hover,
.category-tabs a:hover,
.category-tabs a.is-current,
.tag:hover {
  color: #ffffff;
  background: var(--pink);
}

.page-hero {
  border-radius: 0;
  padding: 80px 0;
}

.page-hero p,
.category-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

.page-hero h1,
.category-hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(42px, 6vw, 64px);
  line-height: 1.08;
}

.category-hero {
  border-radius: 0;
  padding: 70px 0 80px;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.82), rgba(139, 92, 246, 0.56), rgba(236, 72, 153, 0.34)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

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

.inline-filter {
  margin-top: 24px;
}

.inline-filter input {
  width: min(520px, 100%);
  padding: 15px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
}

.category-tabs {
  margin-bottom: 30px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 16px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.rank-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #fce7f3, #dbeafe);
}

.rank-poster span {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  font-weight: 900;
}

.detail-top {
  padding: 34px 0 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.92) 0, rgba(17, 24, 39, 0.86) 360px, transparent 360px);
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.46));
  transition: opacity 0.2s ease;
}

.play-overlay span {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: var(--pink);
  box-shadow: 0 18px 44px rgba(236, 72, 153, 0.42);
  position: relative;
}

.play-overlay span::after {
  content: "";
  position: absolute;
  left: 34px;
  top: 25px;
  border-left: 24px solid #ffffff;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
}

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

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

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
}

.detail-card h2 {
  font-size: 24px;
  margin-top: 30px;
}

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

.lead-text {
  margin-top: 22px;
  color: var(--ink) !important;
  font-size: 18px !important;
  font-weight: 700;
}

.detail-meta {
  margin-bottom: 16px;
}

.detail-tags {
  margin-top: 26px;
}

.detail-side {
  min-width: 0;
}

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

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.prev-next a {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(17, 24, 39, 0.08);
}

.prev-next span {
  color: var(--muted);
  font-size: 13px;
}

.prev-next strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-result {
  display: none;
  padding: 54px 16px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.empty-result.is-visible {
  display: block;
}

.search-summary {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 54px 0 38px;
}

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

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

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

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

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

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

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

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

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

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

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

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

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

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

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

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

  .wide-search button {
    width: 100%;
  }

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

  .movie-card-horizontal,
  .rank-card {
    grid-template-columns: 1fr;
  }

  .poster-wide,
  .rank-poster {
    aspect-ratio: 16 / 10;
  }

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

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

  .brand {
    font-size: 20px;
  }

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

  .movie-grid,
  .compact-grid,
  .horizontal-grid,
  .featured-grid,
  .category-grid,
  .category-grid-large,
  .prev-next {
    grid-template-columns: 1fr;
  }

  .section-block {
    padding: 52px 0;
  }

  .detail-card,
  .cta-panel {
    padding: 22px;
  }
}
