/* Palette-driven themes for the 42-track MV gallery. */
body.yx-gallery-theme {
  --yx-wine: var(--mv-accent, #796aff);
  --yx-wine-dark: var(--mv-surface, #17152f);
  --yx-lilac: var(--mv-accent-2, #79c7ff);
  --yx-line: rgba(var(--mv-accent-rgb, 121, 106, 255), .42);
  --yx-ink: #17151d;
  --yx-soft: rgba(23, 21, 29, .66);
  --yx-paper: rgba(252, 251, 248, .88);
  --yx-ice: rgba(var(--mv-accent-2-rgb, 121, 199, 255), .18);
  --yx-ice-2: rgba(var(--mv-accent-rgb, 121, 106, 255), .14);
}

body.yx-gallery-theme::before {
  content: "";
  display: block !important;
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 16%, rgba(var(--mv-accent-rgb), .34), transparent 32%),
    radial-gradient(circle at 88% 78%, rgba(var(--mv-accent-2-rgb), .30), transparent 34%),
    linear-gradient(118deg, rgba(7, 8, 14, .24), rgba(var(--mv-accent-rgb), .10));
  transition: background .65s ease;
}

body.yx-gallery-theme #yxCurtain {
  opacity: .2 !important;
  transition: opacity .5s ease;
}

body.yx-gallery-theme #app .card,
body.yx-gallery-theme #app .topbar,
body.yx-gallery-theme .yx-home-topbar,
body.yx-gallery-theme .yx-home-panel,
body.yx-gallery-theme .login-card {
  border: 1px solid rgba(var(--mv-accent-rgb), .34) !important;
  background: rgba(250, 249, 247, .82) !important;
  box-shadow: 0 16px 46px rgba(3, 5, 12, .24), inset 0 1px 0 rgba(255, 255, 255, .72) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  backdrop-filter: blur(14px) saturate(1.08);
  transition: border-color .5s ease, box-shadow .5s ease, background .5s ease;
}

body.yx-gallery-theme .btn-primary,
body.yx-gallery-theme .tab.active,
body.yx-gallery-theme .admin-mod.active,
body.yx-gallery-theme .yx-home-action-primary {
  background: linear-gradient(128deg, var(--mv-accent), var(--mv-accent-2)) !important;
  border-color: rgba(var(--mv-accent-rgb), .66) !important;
  color: #fff !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .28);
}

body.yx-gallery-theme input:focus,
body.yx-gallery-theme select:focus,
body.yx-gallery-theme textarea:focus {
  border-color: var(--mv-accent) !important;
  box-shadow: 0 0 0 3px rgba(var(--mv-accent-rgb), .16) !important;
}

body.yx-gallery-theme #yxMvSoundCtrl {
  border-color: rgba(var(--mv-accent-rgb), .72) !important;
  background: rgba(249, 248, 245, .86) !important;
  box-shadow: 5px 5px 0 rgba(var(--mv-accent-rgb), .32) !important;
}

body.yx-gallery-theme #yxMvMenu {
  color: var(--yx-ink) !important;
  border-color: rgba(var(--mv-accent-rgb), .55) !important;
  background: rgba(249, 248, 245, .94) !important;
}

body.yx-gallery-theme #yxMvMenu .yx-mv-pick {
  border-color: rgba(var(--mv-accent-rgb), .22) !important;
}

body.yx-gallery-theme #yxMvMenu .yx-mv-pick:hover,
body.yx-gallery-theme #yxMvMenu .yx-mv-pick.is-active {
  border-color: var(--mv-accent) !important;
  background: rgba(var(--mv-accent-rgb), .13) !important;
}

body.yx-gallery-theme[data-yx-gallery-mode="1"] #app .card,
body.yx-gallery-theme[data-yx-gallery-mode="1"] .yx-home-panel { border-radius: 5px !important; }
body.yx-gallery-theme[data-yx-gallery-mode="2"] #app .card,
body.yx-gallery-theme[data-yx-gallery-mode="2"] .yx-home-panel { border-top: 4px solid var(--mv-accent) !important; }
body.yx-gallery-theme[data-yx-gallery-mode="3"] #app .card,
body.yx-gallery-theme[data-yx-gallery-mode="3"] .yx-home-panel { border-left: 5px solid var(--mv-accent-2) !important; }
body.yx-gallery-theme[data-yx-gallery-mode="4"] #app .card,
body.yx-gallery-theme[data-yx-gallery-mode="4"] .yx-home-panel { box-shadow: 8px 8px 0 rgba(var(--mv-accent-rgb), .28) !important; }
body.yx-gallery-theme[data-yx-gallery-mode="5"] #app .card,
body.yx-gallery-theme[data-yx-gallery-mode="5"] .yx-home-panel { border-radius: 26px 7px 26px 7px !important; }

@media (prefers-reduced-motion: reduce) {
  body.yx-gallery-theme::before,
  body.yx-gallery-theme #app .card { transition: none; }
}
