/* Michaelize It! - builds on ../style.css */

.mz-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px 24px;
  display: grid;
  gap: 22px;
}
.mz-block {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(28, 23, 36, .6);
}
.mz-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin-bottom: 14px;
}
.mz-head h2 {
  margin: 0;
  font-family: var(--brush);
  font-weight: 400;
  font-size: 32px;
  line-height: 1;
}
.hint { margin: 0; color: var(--muted); font-size: 14px; }
.mz-tools { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 19px; }
.btn:disabled { opacity: .45; cursor: progress; }

/* ---------- songs ---------- */
.songs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.song {
  position: relative;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  aspect-ratio: 16 / 8;
  text-align: left;
  transition: transform 140ms, border-color 140ms;
}
.song img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: opacity 140ms; }
.song span { position: absolute; left: 12px; right: 10px; bottom: 8px; color: #fff; text-shadow: 0 2px 10px #000; }
.song b { display: block; font-family: var(--brush); font-weight: 400; font-size: 23px; line-height: 1.05; }
.song small { font-size: 12px; color: #ddd; }
.song:hover img { opacity: .85; }
.song:hover { transform: rotate(-.6deg); }
.song[aria-checked="true"] { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.song[aria-checked="true"] img { opacity: 1; }
.song[aria-checked="true"]::after {
  content: "✓";
  position: absolute; top: 8px; right: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: #1a1206; font-weight: 800; font-size: 14px;
}
.song:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- studio top: mini stage + transport ---------- */
.studio-top { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 14px; }
.mini {
  position: relative;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(70% 45% at 50% 100%, color-mix(in srgb, var(--move) 50%, transparent), transparent 70%),
              linear-gradient(180deg, rgba(8,6,12,.2), rgba(8,6,12,.7)), var(--venue, #111) center / cover;
  box-shadow: 0 0 0 1px var(--line);
}
.mini-dancer {
  position: absolute; left: 50%; bottom: 6px; height: 86%; width: auto; max-width: 96%;
  object-fit: contain; object-position: bottom;
  transform: translateX(-50%); transform-origin: 50% 100%;
  filter: drop-shadow(0 8px 8px rgba(0,0,0,.6));
}
.mini-dancer.flip { scale: -1 1; }
.mini-dancer.bop { animation: mzbop 220ms cubic-bezier(.2, 1.8, .4, 1); }
@keyframes mzbop { 0% { transform: translateX(-50%) scale(1.06, .92); } 100% { transform: translateX(-50%) scale(1); } }
.mini .bubble { top: 6%; font-size: 18px; padding: 6px 10px 8px; }

.transport { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.clock {
  min-width: 78px; text-align: center;
  font: 600 16px/1 ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums;
  color: var(--text);
}
.btn.magic { background: linear-gradient(90deg, #7c5cff, #e0262b); border-color: transparent; color: #fff; }
.btn.magic:hover { filter: brightness(1.15); }
.toggle, .vol {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  color: var(--muted); font-size: 13px;
}
.vol input { width: 90px; accent-color: var(--gold); }
.toggle input { accent-color: var(--gold); width: 16px; height: 16px; }

/* ---------- timeline ---------- */
.tl-wrap { display: grid; grid-template-columns: 62px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #0d0a12; }
.tl-lanes-labels { display: grid; grid-template-rows: 26px 70px repeat(3, 58px); border-right: 1px solid var(--line); background: var(--night-2); }
.tl-lanes-labels span { display: grid; align-items: center; padding-left: 10px; color: var(--muted); font-size: 12px; border-top: 1px solid rgba(255,255,255,.04); }
.tl-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; position: relative; }
.tl { position: relative; height: calc(26px + 70px + 3 * 58px); }
.ruler {
  position: absolute; left: 0; right: 0; top: 0; height: 26px;
  border-bottom: 1px solid var(--line);
  background: var(--night-2);
  cursor: pointer;
}
.ruler b {
  position: absolute; top: 0; bottom: 0;
  border-left: 1px solid rgba(255,255,255,.18);
  padding: 5px 0 0 4px;
  font: 600 11px/1 var(--ui); color: var(--muted);
  pointer-events: none;
}
.wave { position: absolute; left: 0; top: 26px; height: 70px; right: 0; border-bottom: 1px solid var(--line); }
.wave canvas { position: absolute; top: 0; height: 70px; }
.lanes { position: absolute; left: 0; right: 0; top: 96px; }
.lane {
  position: relative; height: 58px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  background-image: var(--grid);
}
.lanes.hot .lane.target { background-color: rgba(242, 182, 49, .08); }
.playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 0; pointer-events: none; z-index: 5; }
.playhead i { position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 10px var(--gold); }
.playhead i::before { content: ""; position: absolute; top: 0; left: -6px; border: 7px solid transparent; border-top: 9px solid var(--gold); }

.clip {
  position: absolute; top: 6px; height: 46px;
  min-width: 26px;
  padding: 4px 22px 4px 8px;
  border: 1px solid color-mix(in srgb, var(--c) 70%, #fff);
  border-radius: 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 75%, #000), color-mix(in srgb, var(--c) 45%, #000));
  color: #fff;
  font-family: var(--brush); font-size: 16px; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  box-shadow: 0 4px 10px -4px #000;
}
.clip:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.clip.selected { box-shadow: 0 0 0 2px #fff, 0 0 18px var(--c); }
.clip.sounding { filter: brightness(1.4); }
.clip.ghosted { opacity: .3; }
.clip .x {
  position: absolute; right: 2px; top: 2px;
  width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; font: 13px/1 var(--ui); cursor: pointer;
}
.clip.added { animation: clipIn 300ms cubic-bezier(.2, 1.7, .4, 1); }
@keyframes clipIn { from { transform: scale(.5); opacity: 0; } }
.drop-mark {
  position: absolute; top: 4px; bottom: 4px; width: 3px; border-radius: 3px;
  background: var(--gold); box-shadow: 0 0 10px var(--gold); pointer-events: none;
}
.tl-info { margin: 8px 2px 14px; color: var(--muted); font-size: 13px; min-height: 1.3em; }

/* ---------- vocal library ---------- */
.vox { display: grid; gap: 12px; }
.vox-group h3 { margin: 0 0 6px; font-family: var(--brush); font-weight: 400; font-size: 24px; color: var(--c); }
.vox-row { display: flex; flex-wrap: wrap; gap: 8px; }
.vchip {
  display: inline-flex; align-items: stretch;
  border: 1px solid color-mix(in srgb, var(--c) 55%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 18%, var(--panel));
  overflow: hidden;
}
.vchip .say {
  padding: 7px 12px 9px 14px; border: 0; background: transparent; color: #fff;
  font-family: var(--brush); font-size: 19px; line-height: 1;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.vchip .say:active { cursor: grabbing; }
.vchip .add {
  width: 34px; border: 0; border-left: 1px solid color-mix(in srgb, var(--c) 40%, var(--line));
  background: rgba(0,0,0,.2); color: #fff; font: 700 17px/1 var(--ui); cursor: pointer;
}
.vchip button:hover { background-color: color-mix(in srgb, var(--c) 30%, transparent); }
.vchip button:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.vchip.on { box-shadow: 0 0 16px var(--c); }

.drag-ghost {
  position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none;
  padding: 7px 14px 9px; border: 2px solid var(--c); border-radius: 999px;
  background: color-mix(in srgb, var(--c) 40%, var(--panel)); color: #fff;
  font-family: var(--brush); font-size: 20px;
  box-shadow: 0 16px 36px -10px #000;
}
.drag-ghost.trash { border-color: #fff; background: #4a1418; }
.drag-ghost.trash::after { content: " 🗑"; font-family: var(--ui); font-size: 16px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 900px) {
  .songs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-top { grid-template-columns: 110px minmax(0, 1fr); }
  .mini { height: 130px; }
}
@media (max-width: 600px) {
  .mz-layout { padding-left: 16px; padding-right: 16px; }
  .mz-block { padding: 14px; }
  .song b { font-size: 19px; }
  .studio-top { grid-template-columns: minmax(0, 1fr); }
  .mini { height: 140px; }
  .tl-wrap { grid-template-columns: 40px minmax(0, 1fr); }
  .tl-lanes-labels span { padding-left: 4px; font-size: 10px; }
  .mz-tools { margin-left: 0; }
}
@media (min-width: 99999px) {
  .mini-dancer.bop, .clip.added { animation: none; }
}

/* =================== DJ desk =================== */
.deck {
  position: relative;
  isolation: isolate;
  padding: 16px 18px 18px;
  border-radius: 22px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px),   /* brushed metal */
    linear-gradient(180deg, #24202c, #141118 60%, #0e0c12);
  border: 1px solid #3a3346;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -2px 0 rgba(0,0,0,.6),
    0 0 0 4px #0a080d,
    0 0 0 5px #2b2433,
    0 30px 70px -30px #000,
    0 0 50px -20px var(--move, #7c5cff);
}
/* screws in the corners */
.deck::before, .deck::after {
  content: "";
  position: absolute;
  top: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9a92a8, #3c3646 70%);
  box-shadow: 0 0 0 1px #0007, 0 1px 1px #000;
  z-index: 2;
}
.deck::before { left: 9px; }
.deck::after { right: 9px; }

/* disco light show over the desk */
.disco { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.disco i {
  position: absolute;
  width: 46%; height: 70%;
  border-radius: 50%;
  filter: blur(46px);
  opacity: .16;
  mix-blend-mode: screen;
  animation: roam 9s ease-in-out infinite alternate;
  transition: opacity 300ms;
}
.disco i:nth-child(1) { background: #ff2bd6; left: -10%; top: -20%; }
.disco i:nth-child(2) { background: #2b7bff; right: -12%; top: -10%; animation-duration: 11s; animation-delay: -3s; }
.disco i:nth-child(3) { background: #ffb02b; left: 30%; bottom: -30%; animation-duration: 8s; animation-delay: -5s; }
.disco i:nth-child(4) { background: #8a2bff; left: 60%; top: 30%; animation-duration: 12s; animation-delay: -2s; }
.disco i:nth-child(5) { background: #2bffd5; left: 5%; top: 50%; animation-duration: 10s; animation-delay: -7s; width: 30%; }
.disco i:nth-child(6) {   /* mirror-ball dots */
  inset: 0; width: auto; height: auto; border-radius: 0; filter: none; opacity: .5;
  background-image:
    radial-gradient(circle, #fff 0 1.4px, transparent 2px),
    radial-gradient(circle, #ff9de9 0 1.2px, transparent 2px),
    radial-gradient(circle, #9dd0ff 0 1.2px, transparent 2px);
  background-size: 140px 110px, 190px 150px, 230px 170px;
  background-position: 0 0, 40px 60px, 90px 20px;
  animation: dots 18s linear infinite;
}
@keyframes roam {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(18%, 12%) scale(1.15); }
  100% { transform: translate(-12%, 20%) scale(.9); }
}
@keyframes dots { to { background-position: 280px 0, -150px 60px, 320px 20px; } }
.deck.live .disco i { opacity: .32; }
.deck.live .disco i:nth-child(6) { opacity: .85; }
.deck.pulse .disco i { opacity: .5; transition: none; }
.deck.pulse .led { background: var(--move); box-shadow: 0 0 12px var(--move); }

.deck-brand {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 12px 16px;
  color: #8f879c; font: 600 11px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase;
}
.deck-brand b {
  font: 400 26px/1 var(--brush); letter-spacing: 0; text-transform: none;
  background: linear-gradient(90deg, #ffd35a, #ff5ad1, #7cc4ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.led {
  margin-left: auto; margin-right: 14px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #3a2a14; box-shadow: inset 0 0 2px #000;
  align-self: center;
}

/* top row: mini stage · transport · mixer */
.deck .studio-top { grid-template-columns: 150px minmax(0, 1fr) auto; gap: 16px; align-items: stretch; }
.deck .mini { box-shadow: 0 0 0 2px #0a080d, 0 0 0 3px #3a3346, inset 0 0 30px #000; }

.transport { display: grid; gap: 10px; align-content: center; }
.display {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, #071612, #0b211b);
  box-shadow: inset 0 2px 8px #000, 0 0 0 1px #000, 0 1px 0 rgba(255,255,255,.06);
  font: 600 26px/1 ui-monospace, "SF Mono", Menlo, monospace;
  color: #5dffb8;
  text-shadow: 0 0 8px rgba(93,255,184,.7);
}
.display .clock { min-width: 0; font: inherit; color: inherit; text-align: left; }
.display .bpm { font-size: 14px; opacity: .8; }

.pads-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pad-btn {
  min-height: 48px; padding: 0 18px;
  border: 1px solid #000; border-radius: 10px;
  background: linear-gradient(180deg, #3a3346, #231e2b);
  color: #f1ecf7;
  font-family: var(--brush); font-size: 22px; line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 3px 0 #000, 0 0 0 1px #4a4157;
  transition: transform 80ms, box-shadow 80ms, filter 120ms;
}
.pad-btn:hover { filter: brightness(1.2); }
.pad-btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 #000, 0 0 0 1px #4a4157; }
.pad-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.pad-btn:disabled { opacity: .45; cursor: progress; }
.pad-btn.play { min-width: 128px; background: linear-gradient(180deg, #2fd27a, #13894a); color: #04130a; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 0 #000, 0 0 18px rgba(47,210,122,.45); }
.pad-btn.play.on { background: linear-gradient(180deg, #ffcf4a, #d18a12); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 0 #000, 0 0 22px rgba(255,190,60,.7); }
.pad-btn.magic { background: linear-gradient(90deg, #7c5cff, #ff2bd6, #e0262b); background-size: 200% 100%; color: #fff; animation: shimmer 4s linear infinite; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 3px 0 #000, 0 0 20px rgba(255,43,214,.45); }
@keyframes shimmer { to { background-position: 200% 0; } }

.small-row { display: flex; flex-wrap: wrap; gap: 10px; }
.toggle, .knob {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 0 12px;
  border-radius: 8px; background: #0e0c12; box-shadow: inset 0 1px 4px #000, 0 0 0 1px #2d2736;
  color: #a39bb0; font: 600 11px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase;
}
.knob input { width: 110px; accent-color: #ff5ad1; }
.toggle input { accent-color: #5dffb8; width: 16px; height: 16px; }

/* mixer: vertical faders + LED meters */
.mixer {
  display: flex; align-items: stretch; gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0d0b11;
  box-shadow: inset 0 2px 8px #000, 0 0 0 1px #2d2736;
}
.vu { width: 14px; height: 150px; align-self: center; border-radius: 3px; background: #050407; }
.fader { display: grid; justify-items: center; gap: 6px; color: #a39bb0; font: 600 10px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; }
.fader input {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 30px; height: 132px;
  margin: 0;
  -webkit-appearance: none; appearance: none;
  background: transparent;
  cursor: ns-resize;
}
.fader input::-webkit-slider-runnable-track { width: 6px; border-radius: 3px; background: linear-gradient(180deg, #ff2bd6, #7c5cff 50%, #222); box-shadow: inset 0 1px 3px #000; }
.fader input::-moz-range-track { width: 6px; border-radius: 3px; background: linear-gradient(180deg, #ff2bd6, #7c5cff 50%, #222); }
.fader input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 30px; height: 16px; margin-left: -12px; border-radius: 3px;
  background: linear-gradient(180deg, #e9e6ee, #8d8698 45%, #e9e6ee 50%, #6d6677);
  box-shadow: 0 2px 4px #000;
}
.fader input::-moz-range-thumb { width: 30px; height: 16px; border-radius: 3px; border: 0; background: linear-gradient(180deg, #e9e6ee, #8d8698 45%, #e9e6ee 50%, #6d6677); }
.fader input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* neon timeline */
.deck .tl-wrap { margin-top: 14px; background: #08070b; border-color: #2d2736; box-shadow: inset 0 2px 10px #000; }
.deck .tl-lanes-labels { background: #0f0d14; }
.deck .tl-lanes-labels span { color: #8f879c; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 10px; }
.deck .ruler { background: linear-gradient(180deg, #17131d, #0f0d14); }
.deck .ruler b { color: #5dffb8; text-shadow: 0 0 6px rgba(93,255,184,.6); }
.deck .lane:nth-child(1) { box-shadow: inset 3px 0 0 #f2b631; }
.deck .lane:nth-child(2) { box-shadow: inset 3px 0 0 #ff2bd6; }
.deck .lane:nth-child(3) { box-shadow: inset 3px 0 0 #2bb8ff; }
.deck .clip { box-shadow: 0 0 12px -2px var(--c), 0 4px 10px -4px #000; }
.deck .clip.sounding { box-shadow: 0 0 24px 2px var(--c); }
.deck .tl-info { color: #8f879c; }
.deck .vox-group h3 { text-shadow: 0 0 12px var(--c); }
.deck .vchip { background: #120f17; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent), 0 0 10px -4px var(--c); }

@media (max-width: 900px) {
  .deck .studio-top { grid-template-columns: 120px minmax(0, 1fr); }
  .mixer { grid-column: 1 / -1; justify-content: center; }
  .vu, .fader input { height: 110px; }
}
@media (max-width: 600px) {
  .deck { padding: 12px 12px 14px; }
  .deck .studio-top { grid-template-columns: minmax(0, 1fr); }
  .deck-brand span { display: none; }
  .display { font-size: 22px; }
  .pad-btn { flex: 1 1 auto; }
}
@media (min-width: 99999px) {
  .disco i, .pad-btn.magic { animation: none; }
}
