
:root{
  --bg0:#0a0c10;
  --bg1:#0c111a;
  --card: rgba(255,255,255,.04);
  --card2: rgba(255,255,255,.06);
  --stroke: rgba(255,255,255,.10);
  --shadow: 0 18px 50px rgba(0,0,0,.55);
  --r: #ff4b4b;
  --b: #35d7ff;
  --p: #b24bff;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1000px 700px at 50% 0%, rgba(178,75,255,.12), transparent 70%),
              radial-gradient(900px 900px at 20% 40%, rgba(53,215,255,.10), transparent 70%),
              radial-gradient(900px 900px at 80% 60%, rgba(255,75,75,.10), transparent 70%),
              linear-gradient(180deg, var(--bg1), var(--bg0));
  color: rgba(255,255,255,.92);
  padding: 18px 18px 28px;
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--stroke);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.sponsorbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px; gap:16px;
  background: linear-gradient(90deg, rgba(52,170,255,0.95), rgba(116,92,255,0.85), rgba(52,170,255,0.92));
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sponsor-box{
  background: rgba(255,255,255,.06);
  border: 2px solid rgba(0,0,0,.55);
  border-radius: 14px;
  height: 96px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.sponsor-inner{
  font-weight: 1000;
  font-size: 44px;
  color: #3a66d6;
}

.smv-link{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.smv-link img{
  max-width: 100%;
  max-height: 92px;
  height: auto;
  width: auto;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.35));
}

.smv-link .store-promo{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.logo-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 6px 12px;
}
.logo-img{
  width: min(520px, 52vw);
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.40));
}

.controlstrip{
  margin-top: 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
}
.startcluster{ display:flex; align-items:center; gap:12px; }
.start-hint{ font-weight:1000; opacity:.85; }

.btn{
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 1000;
  cursor:pointer;
}
.btn:hover{ background: rgba(255,255,255,.09); }
.btn.primary{
  border: none;
  background: linear-gradient(90deg, rgba(53,215,255,.95), rgba(178,75,255,.95));
  color: #051018;
}
.btn.play-btn{
  border: none;
  background: linear-gradient(90deg, #76f58f, #27b84c);
  color: #07200f;
}
.btn.cue-btn{
  border: none;
  background: linear-gradient(90deg, #7ec7ff, #2f6ef0);
  color: #06152c;
}
.btn.ghost{
  background: rgba(255,255,255,.05);
}

.flash-until-enabled{
  animation: startFlash 1.05s ease-in-out infinite;
}
@keyframes startFlash{
  0%,100%{ transform: translateY(0) scale(1); filter: brightness(1); box-shadow: 0 0 0 rgba(178,75,255,0.0); }
  50%{ transform: translateY(-1px) scale(1.03); filter: brightness(1.08); box-shadow: 0 0 28px rgba(178,75,255,.28); }
}

.wavepanel{
  margin-top: 14px;
  padding: 14px;
}
.wave-row{
  display:grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items:center;
  margin-bottom: 10px;
}
.wave-label{
  width: 22px; height: 22px;
  display:flex; align-items:center; justify-content:center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  font-weight: 1100;
}
.wave-canvas{
  width: 100%;
  height: 80px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.wave-tip{
  margin-top: 4px;
  font-size: 12px;
  opacity:.78;
}

.main-grid{
  margin-top: 14px;
  display:grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 14px;
  align-items:start;
}
.col{
  display:flex;
  flex-direction:column;
  gap: 14px;
}
.side{ padding: 14px; }
.center{ padding: 14px; }
.deck{ padding: 14px; }

.side-title{
  font-size: 34px;
  font-weight: 1100;
  margin-bottom: 10px;
}
.fx-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.fxbtn{
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  font-weight: 1100;
  cursor:pointer;
}
.fxbtn.latched{ outline:2px solid rgba(178,75,255,.55); background: rgba(178,75,255,.12); }

.hs-title{
  margin-top: 14px;
  font-weight: 1100;
  opacity:.9;
}
.hot-grid{
  margin-top: 8px;
  display:grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
}
.hot-btn{
  position:relative;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  font-weight: 1100;
  cursor:pointer;
}
.hot-btn .hs-x{
  position:absolute; top:-8px; right:-8px;
  width:18px; height:18px;
  display:flex; align-items:center; justify-content:center;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.55);
  font-weight: 1100;
  font-size: 14px;
  opacity:.9;
}
.hot-btn .hs-x:hover{ background: rgba(178,75,255,.20); }

.center-title{
  text-align:center;
  letter-spacing:.35em;
  font-weight: 1100;
  opacity:.85;
  margin-bottom: 10px;
}

.xfader-area{
  display:flex;
  align-items:flex-start;
  gap: 12px;
}
.xfader-wrap{ padding: 6px 8px 10px; flex:1; }
.xfader-head{
  display:flex; justify-content:space-between;
  font-weight: 1100;
  opacity:.8;
}
#cross{ width:100%; margin: 10px 0 10px; }
.mixview{
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  overflow:hidden;
  background: rgba(255,255,255,.06);
}
.mixfill{
  height:100%;
  width:50%;
  background: linear-gradient(90deg, var(--r), var(--p), var(--b));
}
.chk{ display:flex; align-items:center; gap:8px; font-weight:1000; opacity:.9; margin-top: 10px; }

.vol-strip.left .vol-label{ color: rgba(255,80,80,.95); }
.vol-strip.right .vol-label{ color: rgba(70,175,255,.95); }
.vol-strip.left .vol-fader{ accent-color: rgba(255,80,80,1); }
.vol-strip.right .vol-fader{ accent-color: rgba(70,175,255,1); }

.block-title{
  margin-top: 14px;
  font-weight: 1100;
  opacity:.92;
}
.row{ display:flex; gap: 10px; align-items:center; margin-top: 8px; }
.select{
  flex:1;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.20);
  color: rgba(255,255,255,.92);
  padding: 0 10px;
  font-weight: 1000;
}
.note{ font-size: 12px; opacity:.74; margin-top: 6px; }

.bpm-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.bpm{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.16);
  padding: 10px;
}
.bpm-label{ font-size: 12px; opacity:.7; font-weight: 900; }
.bpm-val{ font-size: 22px; font-weight: 1100; margin-top: 4px; }

.liblist{
  margin-top: 8px;
  max-height: 220px;
  overflow:auto;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(0,0,0,.18);
  padding: 8px;
}

.deck-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap: 10px;
}
.deck-title{ font-weight:1100; letter-spacing:.18em; opacity:.9; }
.deck-meta{ font-size: 12px; opacity:.75; }
.deck-controls{ display:flex; gap:10px; margin-top: 10px; }
.deck-controls .loop-toggle{
  margin-top: 0;
  padding: 0 6px;
  font-size: 12px;
  opacity: .95;
}
.automix .btn.is-active{
  border-color: rgba(53,215,255,.9);
  box-shadow: 0 0 0 2px rgba(53,215,255,.25) inset;
}

.platter{
  margin-top: 16px;
  display:flex;
  flex-direction:column;
  align-items:center;
}
.platter-disc{
  width: 260px; height: 260px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(178,75,255,.40), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(53,215,255,.20), transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.08), rgba(0,0,0,.25));
  border: 10px solid rgba(0,0,0,.55);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.08), 0 30px 60px rgba(0,0,0,.55);
  position:relative;
}
.platter-core{
  position:absolute;
  width: 78px; height: 78px;
  border-radius: 50%;
  left:50%; top:50%;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.65), rgba(0,0,0,.10));
  border: 2px solid rgba(255,255,255,.18);
  box-shadow: 0 2px 10px rgba(0,0,0,.35), inset 0 0 0 3px rgba(255,255,255,.25);
  display:flex;
  align-items:center;
  justify-content:center;
}
.platter-logo{
  width: 56px;
  height: 56px;
  object-fit: contain;
  opacity: .96;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}
.platter-label{ margin-top: 8px; font-size: 12px; opacity:.70; }

.modal.hidden{ display:none; }
.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.modal-card{
  width: min(620px, 92vw);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,12,16,.92);
  padding: 16px;
  box-shadow: var(--shadow);
}
.modal-title{ font-weight:1100; font-size: 18px; margin-bottom: 8px; }
.krow{ padding: 8px 0; border-top: 1px solid rgba(255,255,255,.08); opacity:.9; }
.krow:first-child{ border-top: none; }
.k{ display:inline-block; min-width: 130px; font-weight: 1100; }

@media (max-width: 1120px){
  .main-grid{ grid-template-columns: 1fr; grid-template-rows: auto; }
  .sponsorbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px; gap:16px;
  background: linear-gradient(90deg, rgba(52,170,255,0.95), rgba(116,92,255,0.85), rgba(52,170,255,0.92));
  border-bottom: 1px solid rgba(255,255,255,.08);
}
  .sponsor-box{ height: 82px; }
  .sponsor-inner{ font-size: 34px; }
  .logo-img{ width: min(520px, 86vw); }
}

.fx-grid{ min-height: 120px; }
.hot-grid{ min-height: 64px; }

.version-badge{
  margin-right:auto;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.28);
  font-weight: 1100;
  letter-spacing:.06em;
}
.fx-grid{ min-height: 120px; }
.hot-grid{ min-height: 64px; }

/* v0.20 additions */
.hot-btn{ position: relative; overflow: hidden; color: rgba(0,0,0,.86); }
.hot-btn .hs-x{ position:absolute; top:6px; right:8px; font-weight: 1100; opacity: .85; }
.hot-btn.hot-1{ background: linear-gradient(90deg, rgba(255,75,75,.95), rgba(255,177,75,.95)); }
.hot-btn.hot-2{ background: linear-gradient(90deg, rgba(255,177,75,.95), rgba(242,255,75,.95)); }
.hot-btn.hot-3{ background: linear-gradient(90deg, rgba(242,255,75,.95), rgba(55,255,122,.95)); }
.hot-btn.hot-4{ background: linear-gradient(90deg, rgba(55,255,122,.95), rgba(53,215,255,.95)); }
.hot-btn.hot-5{ background: linear-gradient(90deg, rgba(53,215,255,.95), rgba(91,124,255,.95)); }
.hot-btn.hot-6{ background: linear-gradient(90deg, rgba(91,124,255,.95), rgba(178,75,255,.95)); }
.hot-btn.hot-7{ background: linear-gradient(90deg, rgba(178,75,255,.95), rgba(216,166,255,.95)); }
.hot-btn.hot-8{ background: linear-gradient(90deg, rgba(216,166,255,.95), rgba(255,75,180,.95)); }
.hot-btn.is-set{ outline: 2px solid rgba(255,255,255,.60); box-shadow: 0 0 0 2px rgba(0,0,0,.25) inset; }

.sample-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.sample-pad{ border-radius: 14px; padding: 14px 10px; font-weight: 1000; letter-spacing: .06em;
  border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.24); cursor: pointer; }
.sample-pad.playing{ outline: 2px solid rgba(255,255,255,.65); }

.platter-disc{ cursor: grab; user-select: none; touch-action: none; }
.platter-disc:active{ cursor: grabbing; }

/* v0.21 additions */
.sample-pad{ color: rgba(0,0,0,.86); border: 0; }
.sample-pad.pad-1{ background: linear-gradient(90deg, rgba(255,75,75,.95), rgba(255,177,75,.95)); }
.sample-pad.pad-2{ background: linear-gradient(90deg, rgba(255,177,75,.95), rgba(242,255,75,.95)); }
.sample-pad.pad-3{ background: linear-gradient(90deg, rgba(242,255,75,.95), rgba(55,255,122,.95)); }
.sample-pad.pad-4{ background: linear-gradient(90deg, rgba(55,255,122,.95), rgba(53,215,255,.95)); }
.sample-pad.pad-5{ background: linear-gradient(90deg, rgba(53,215,255,.95), rgba(91,124,255,.95)); }
.sample-pad.pad-6{ background: linear-gradient(90deg, rgba(91,124,255,.95), rgba(178,75,255,.95)); }
.sample-pad.pad-7{ background: linear-gradient(90deg, rgba(178,75,255,.95), rgba(216,166,255,.95)); }
.sample-pad.pad-8{ background: linear-gradient(90deg, rgba(216,166,255,.95), rgba(255,75,180,.95)); }
.sample-pad.latched{ outline: 3px solid rgba(255,255,255,.70); box-shadow: 0 0 0 2px rgba(0,0,0,.25) inset; }
.sample-note{ margin-top: 6px; opacity: .75; font-size: 12px; }

/* v0.28 */
.lib-pop{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; z-index:9999; }
.lib-pop.show{ display:flex; }
.lib-pop .backdrop{ position:absolute; inset:0; background: rgba(0,0,0,.65); }
.lib-pop .panel{ position:relative; width:min(720px, calc(100% - 28px)); max-height:70vh; overflow:auto;
  border-radius:18px; border:1px solid rgba(255,255,255,.12); background: rgba(18,18,22,.95);
  box-shadow: 0 20px 60px rgba(0,0,0,.55); padding: 14px;
}
.lib-pop .row{ display:flex; justify-content:space-between; gap:12px; padding:10px 10px; border-radius:12px;
  border:1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); margin-bottom:10px;
}
.lib-pop .row:hover{ background: rgba(255,255,255,.06); }
.lib-pop .name{ font-weight:900; letter-spacing:.02em; }
.lib-pop .hint{ opacity:.7; font-size:12px; }
.lib-pop .btn{ border:1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color:#fff;
  border-radius:12px; padding:10px 12px; font-weight:900;
}
.lib-pop .btn:hover{ background: rgba(255,255,255,.10); }
.liblist{margin-top:10px;max-height:260px;overflow:auto;border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:8px;background:rgba(0,0,0,.18);}
.lib-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 10px;border-radius:12px;
  border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.03);margin-top:10px;}
.lib-row:hover{background:rgba(255,255,255,.06);}
.lib-meta{min-width:0;flex:1;}
.lib-name{font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.lib-actions{display:flex;gap:8px;flex:0 0 auto;}

.vol-strip{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:10px;}
.cross-mid{display:flex;flex-direction:column;align-items:center;gap:6px;}
.vol-col{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:44px;}
.vol-label{font-size:11px;opacity:.85;letter-spacing:.12em;}
.vol-fader{writing-mode:bt-lr;-webkit-appearance: slider-vertical;width:28px;height:140px;}
@supports not (writing-mode: bt-lr){
  .vol-fader{transform:rotate(-90deg); width:140px; height:28px;}
}

.sample-assign{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}
.sample-assign .sbtn{font-size:11px;padding:6px 7px;border-radius:10px;min-width:28px}
