:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --pink: #ec4899;
  --blue: #3b82f6;
  --purple: #7c3aed;
  --orange: #f97316;
  --dark: #0f172a;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  box-shadow: 0 12px 25px rgba(236, 72, 153, 0.35);
}

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

.nav-link,
.nav-menu-button {
  border: 0;
  background: transparent;
  color: #334155;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-menu:hover .nav-menu-button {
  color: var(--pink);
  background: #fdf2f8;
}

.nav-menu {
  position: relative;
}

.nav-menu-panel {
  position: absolute;
  top: 42px;
  left: 0;
  min-width: 180px;
  padding: 10px;
  display: none;
  grid-template-columns: 1fr;
  gap: 4px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.nav-menu:hover .nav-menu-panel {
  display: grid;
}

.nav-menu-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #475569;
}

.nav-menu-panel a:hover {
  background: #eff6ff;
  color: var(--blue);
}

.header-search,
.mobile-search,
.large-search,
.category-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search {
  margin-left: auto;
}

.header-search input,
.mobile-search input,
.large-search input,
.category-filter input {
  min-width: 250px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  background: #ffffff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.category-filter input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.15);
}

.header-search button,
.mobile-search button,
.large-search button,
.category-filter button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--pink), var(--blue));
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 28px;
}

.mobile-nav {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-nav.open {
  display: grid;
}

.mobile-nav a {
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.mobile-search {
  grid-column: 1 / -1;
}

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: 90px 18px 18px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(8px);
}

.search-panel-inner {
  max-width: 920px;
  max-height: 80vh;
  margin: 0 auto;
  overflow: auto;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.search-panel-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.search-panel-head button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: #f1f5f9;
  cursor: pointer;
}

.search-results {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.search-result-item img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-soft);
}

.hero-section {
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(236, 72, 153, 0.4), transparent 28%), linear-gradient(135deg, #25104f 0%, #4c113b 45%, #0f2c66 100%);
}

.hero-shell {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.15);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(88, 28, 135, 0.62), rgba(14, 165, 233, 0.22));
}

.hero-copy {
  position: relative;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 110px 20px 150px;
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #fce7f3;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 30px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--pink), var(--blue));
  box-shadow: 0 18px 35px rgba(59, 130, 246, 0.25);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.02);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.38);
  cursor: pointer;
  font-size: 34px;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

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

.quick-search-block,
.content-section,
.page-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.quick-search-block {
  margin-top: -54px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.quick-search-block span,
.page-hero span {
  color: var(--pink);
  font-weight: 800;
}

.quick-search-block h2,
.page-hero h1 {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.large-search input {
  min-width: min(440px, 52vw);
}

.content-section {
  padding-top: 56px;
  padding-bottom: 28px;
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

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

.section-more,
.text-link {
  color: var(--pink);
  font-weight: 700;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #581c87);
}

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.play-mini {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--blue));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--pink));
}

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

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

.meta-line span,
.detail-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

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

.category-card,
.category-overview-card {
  position: relative;
  min-height: 210px;
  padding: 22px;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #581c87, #be185d 48%, #1d4ed8);
  box-shadow: var(--shadow);
}

.category-card:nth-child(2n),
.category-overview-card:nth-child(2n) {
  background: linear-gradient(135deg, #0f766e, #2563eb 52%, #7c3aed);
}

.category-card:nth-child(3n),
.category-overview-card:nth-child(3n) {
  background: linear-gradient(135deg, #9a3412, #db2777 55%, #4338ca);
}

.category-glow {
  position: absolute;
  right: -40px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-card strong,
.category-card-title {
  display: block;
  font-size: 24px;
  font-weight: 900;
}

.category-card p,
.category-overview-card p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.category-samples,
.category-preview-links {
  display: grid;
  gap: 7px;
}

.category-samples a,
.category-preview-links a {
  display: inline-block;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.page-hero {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: end;
  padding-top: 54px;
  padding-bottom: 54px;
  border-radius: 30px;
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(236, 72, 153, 0.55), transparent 32%), linear-gradient(135deg, #111827, #581c87 48%, #1d4ed8);
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 720px;
  color: #dbeafe;
  line-height: 1.8;
}

.category-filter input {
  min-width: min(340px, 42vw);
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.06);
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

.ranking-cover img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.ranking-cover span {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--pink));
}

.ranking-row h2 {
  margin: 12px 0 8px;
}

.ranking-row p {
  color: var(--muted);
  line-height: 1.8;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #ffffff;
  background: var(--dark);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(2px) saturate(1.2);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.7), rgba(15, 23, 42, 0.45));
}

.detail-content {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 20px 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 38px;
  color: #cbd5e1;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 780px;
  color: #e2e8f0;
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta span {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-text {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  background: #020617;
}

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

.video-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.58));
}

.video-start.is-hidden {
  display: none;
}

.video-start span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 32px;
  background: linear-gradient(135deg, var(--pink), var(--blue));
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
}

.detail-text {
  padding: 28px;
}

.detail-text h2 {
  margin: 0 0 12px;
}

.detail-text p {
  color: #334155;
  line-height: 1.95;
}

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

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: 30px;
}

.footer-logo {
  color: #ffffff;
}

.footer-inner p {
  max-width: 440px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.movie-card.is-hidden {
  display: none;
}

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

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

  .header-search {
    display: none;
  }

  .desktop-nav {
    margin-left: auto;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .header-inner {
    gap: 12px;
  }

  .hero-shell {
    min-height: 620px;
  }

  .hero-copy {
    padding-top: 90px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-block,
  .page-hero,
  .detail-main,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .large-search,
  .category-filter,
  .mobile-search {
    flex-direction: column;
    align-items: stretch;
  }

  .large-search input,
  .category-filter input,
  .mobile-search input {
    min-width: 0;
    width: 100%;
  }

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

  .ranking-row {
    grid-template-columns: 110px 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .site-logo span:last-child {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

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

  .ranking-row {
    grid-template-columns: 90px 1fr;
    gap: 12px;
  }

  .detail-content {
    padding-top: 26px;
  }
}
