/* Licensed Pathé homepage treatment. Scope is limited to the authenticated home route. */
:root {
  --pathe-ink: #151821;
  --pathe-night: #0d1017;
  --pathe-panel: #1d222d;
  --pathe-yellow: #f4bf2d;
  --pathe-white: #f7f4ec;
  --pathe-muted: #b9bdc5;
}

body:has(.music-home.cinema-home) {
  background: var(--pathe-night);
  color: var(--pathe-white);
}

.music-home.cinema-home {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding-bottom: calc(132px + env(safe-area-inset-bottom));
  background: var(--pathe-ink);
  color: var(--pathe-white);
  font-family: "Franklin Gothic Medium", "Microsoft YaHei", sans-serif;
}

.cinema-home-video {
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  width: 100%;
  height: min(82vh, 820px);
  object-fit: cover;
  object-position: center;
  background: #10131a;
  filter: saturate(.82) contrast(1.06);
  opacity: 1;
  transition: opacity 160ms ease;
}

.cinema-home-video.is-changing { opacity: .35; }

.cinema-home-carousel {
  position: absolute;
  z-index: 22;
  top: clamp(360px, 57vh, 610px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

.cinema-home-carousel__dot {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.cinema-home-carousel__dot::before {
  display: block;
  width: 24px;
  height: 8px;
  margin: auto;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 4px;
  background: rgba(255,255,255,.18);
  content: "";
  transform: scaleX(.34);
  transition: transform 180ms ease, background-color 180ms ease;
}

.cinema-home-carousel__dot.is-active::before {
  border-color: #ffc426;
  background: #ffc426;
  transform: scaleX(1);
}

.cinema-home-carousel__dot:focus-visible {
  outline: 2px solid #ffc426;
  outline-offset: -6px;
}

.music-home.cinema-home::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: min(82vh, 820px);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(13,16,23,.22) 0%, rgba(13,16,23,.18) 42%, rgba(13,16,23,.96) 100%);
}

.music-home.cinema-home > *:not(.cinema-home-video):not(.cinema-home-carousel):not(.music-start) { position: relative; z-index: 2; }
.music-home.cinema-home > .cinema-home-video { position: absolute; z-index: 0; }

.cinema-home .music-header {
  min-height: min(82vh, 820px);
  align-items: flex-end;
  padding: clamp(24px, 6vw, 82px) clamp(22px, 7vw, 112px) clamp(48px, 9vw, 116px);
  background: transparent;
}

.cinema-home .music-greeting { max-width: 760px; }
.cinema-home .music-greeting h1 {
  margin: 0;
  color: var(--pathe-white);
  font-size: clamp(40px, 8vw, 92px);
  line-height: .95;
  letter-spacing: 0;
  font-weight: 800;
  text-transform: uppercase;
}
.cinema-home .music-greeting p {
  margin-top: 22px;
  color: var(--pathe-white);
  font-size: clamp(15px, 2vw, 21px);
  letter-spacing: 0;
}

.cinema-home-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  color: var(--pathe-white);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}
.cinema-home-brand svg { width: 112px; height: 42px; fill: currentColor; }

.cinema-home .music-header-actions { align-self: flex-start; }
.cinema-home .music-icon-button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(247,244,236,.65);
  border-radius: 50%;
  background: rgba(13,16,23,.35);
  color: var(--pathe-white);
  backdrop-filter: blur(8px);
}
.cinema-home .music-icon-button:hover { border-color: var(--pathe-yellow); background: var(--pathe-yellow); }

.cinema-home .music-quick-grid {
  position: relative;
  z-index: 3;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 clamp(22px, 7vw, 112px);
  padding: 0;
  border-top: 1px solid rgba(247,244,236,.28);
  border-bottom: 1px solid rgba(247,244,236,.28);
}
.cinema-home .music-quick-action {
  min-height: 116px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 18px 16px;
  border-right: 1px solid rgba(247,244,236,.2);
  color: var(--pathe-white);
  text-align: left;
}
.cinema-home .music-quick-action:last-child { border-right: 0; }
.cinema-home .music-quick-action > div:first-child {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(247,244,236,.6);
  border-radius: 50%;
  background: transparent;
}
.cinema-home .music-quick-action > div:first-child::after {
  content: "";
  width: 22px;
  height: 22px;
  color: var(--pathe-yellow);
  background: currentColor;
  -webkit-mask: var(--pathe-action-icon) center / contain no-repeat;
  mask: var(--pathe-action-icon) center / contain no-repeat;
}
.cinema-home .music-quick-action:nth-child(1) { --pathe-action-icon: url("/pathe-home-v1/icons/culture.svg"); }
.cinema-home .music-quick-action:nth-child(2) { --pathe-action-icon: url("/pathe-home-v1/icons/film.svg"); }
.cinema-home .music-quick-action:nth-child(3) { --pathe-action-icon: url("/pathe-home-v1/icons/promoter.svg"); }
.cinema-home .music-quick-action:nth-child(4) { --pathe-action-icon: url("/pathe-home-v1/icons/link.svg"); }
.cinema-home .music-quick-action:nth-child(5) { --pathe-action-icon: url("/pathe-home-v1/icons/partner.svg"); }
.cinema-home .music-quick-action:nth-child(6) { --pathe-action-icon: url("/pathe-home-v1/icons/about.svg"); }
.cinema-home .music-quick-action:nth-child(7) { --pathe-action-icon: url("/pathe-home-v1/icons/deposit.svg"); }
.cinema-home .music-quick-action:nth-child(8) { --pathe-action-icon: url("/pathe-home-v1/icons/withdraw.svg"); }
.cinema-home .music-quick-action img { display: none; }
.cinema-home .music-quick-label { margin-top: auto; font-size: 14px; line-height: 1.3; text-align: left; }
.cinema-home .music-quick-action:hover { background: rgba(244,191,45,.1); }
.cinema-home .music-quick-action:hover > div:first-child { border-color: var(--pathe-yellow); background: var(--pathe-yellow); }
.cinema-home .music-quick-action:hover > div:first-child::after { color: var(--pathe-ink); }
.cinema-home .music-quick-action:focus-visible { outline: 2px solid var(--pathe-yellow); outline-offset: -4px; }

.cinema-home .music-catalog,
.cinema-home .music-secondary-content { position: relative; z-index: 2; }
.cinema-home .music-catalog { width: auto; margin: 0 clamp(22px, 7vw, 112px); padding-top: 52px; }
.cinema-home .music-section-header h2 { color: var(--pathe-white); font-size: clamp(24px, 3.4vw, 42px); letter-spacing: -.02em; }
.cinema-home .music-more { color: var(--pathe-yellow); }
.cinema-home .music-playlist { border-bottom: 1px solid rgba(247,244,236,.15); }
.cinema-home .music-playlist-title { color: var(--pathe-white); }
.cinema-home .music-creator,
.cinema-home .music-track-count,
.cinema-home .music-source { color: var(--pathe-muted); }
.cinema-home .music-cover-link { border-radius: 0; background: var(--pathe-panel); }
.cinema-home .music-play-circle { border: 1px solid rgba(247,244,236,.65); background: transparent; }
.cinema-home .music-listen:hover .music-play-circle { background: var(--pathe-yellow); }

.cinema-home .music-start {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(80px + env(safe-area-inset-bottom));
  width: min(86%, 540px);
  min-height: 58px;
  border-radius: 0;
  background: var(--pathe-yellow);
  color: var(--pathe-ink);
  box-shadow: 0 12px 32px rgba(0,0,0,.36);
  font-size: 16px !important;
  letter-spacing: 0;
  text-transform: uppercase;
}
.cinema-home .music-start:hover { filter: brightness(1.06); }
.cinema-home .music-start-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--pathe-ink); }

.cinema-home .music-secondary-content {
  margin-top: 50px;
  padding: 44px clamp(22px, 7vw, 112px) 72px;
  background: linear-gradient(90deg, rgba(13,16,23,.96), rgba(13,16,23,.72)), url("/pathe-home-v1/cinema.jpg") center / cover;
}

body:has(.cinema-home) .van-tabbar {
  background: rgba(13,16,23,.97) !important;
  --van-tabbar-item-text-color: var(--pathe-muted);
  --van-tabbar-item-active-color: var(--pathe-yellow);
  --van-tabbar-item-active-background: rgba(13,16,23,.97);
}
body:has(.cinema-home) .van-tabbar-item:nth-child(2),
body:has(.cinema-home) .van-tabbar-item:nth-child(3) { display: flex; }

@media (max-width: 700px) {
  .cinema-home-carousel { top: min(56vh, 470px); }
  .cinema-home .music-header { min-height: 72vh; padding-bottom: 56px; }
  .cinema-home .music-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cinema-home .music-quick-action:nth-child(2n) { border-right: 0; }
  .cinema-home .music-quick-action:nth-child(n+3) { border-top: 1px solid rgba(247,244,236,.2); }
  .cinema-home .music-catalog { padding-top: 34px; }
  .cinema-home .music-start { width: calc(100% - 44px); }
}

@media (prefers-reduced-motion: reduce) {
  .cinema-home-carousel__dot::before { transition: none; }
}
