/* SpotWerk 1v0 - created by AnnoBoy 2026 */
body.dunkel { --bg:#120e20; --panel:#1c1730; --panel2:#262040; --rand:#383057; --text:#efeaff; --leise:#a89fc8; --knopf:#2c2550; --knopfh:#3b3268;
  --akz1:#f59e0b; --akz2:#a855f7; --akz3:#06b6d4; --schatten:rgba(0,0,0,.5); --spurbg:#15112a; --welle:rgba(168,85,247,.35); }
body.hell   { --bg:#f6f2ff; --panel:#ffffff; --panel2:#efe9ff; --rand:#dccff8; --text:#1d1733; --leise:#675e8c; --knopf:#f0eaff; --knopfh:#e2d7ff;
  --akz1:#d97706; --akz2:#7c3aed; --akz3:#0891b2; --schatten:rgba(70,40,140,.16); --spurbg:#f7f3ff; --welle:rgba(124,58,237,.25); }
* { box-sizing:border-box; }
html, body { margin:0; min-height:100%; }
body { background:var(--bg); color:var(--text); font:14px/1.4 "Segoe UI", Inter, system-ui, sans-serif; -webkit-tap-highlight-color:transparent; }
#app { display:flex; flex-direction:column; gap:10px; padding:12px 14px 8px; max-width:1760px; margin:0 auto; min-height:100vh; }
h1, h2 { margin:0; }
h2 { font-size:15px; font-weight:700; display:flex; align-items:center; gap:6px; }
h2 small { font-weight:500; color:var(--leise); font-size:12px; }
.leise { color:var(--leise); }
.klein { font-size:12px; margin:4px 0; }
.luecke { flex:1; }
[hidden] { display:none !important; }

/* Kopf */
.kopf { display:flex; align-items:center; gap:14px; min-height:66px; border-radius:18px; padding:8px 18px; flex-wrap:wrap;
  background:linear-gradient(100deg,#4c1d95 0%,#7c3aed 45%,#c026d3 75%,#f59e0b 120%); color:#fff; box-shadow:0 8px 24px var(--schatten); }
.kopf h1 { font-size:25px; letter-spacing:.3px; }
.kopf p { margin:0; font-size:13px; opacity:.92; }
.logo { position:relative; width:44px; height:44px; flex:none; transform:rotate(-8deg); }
.logo i { position:absolute; width:26px; height:26px; border:2px solid #fde68a; border-radius:5px; }
.logo i:nth-child(1) { left:4px; top:12px; background:rgba(253,230,138,.25); }
.logo i:nth-child(2) { left:14px; top:4px; background:rgba(255,255,255,.12); }
.logo i:nth-child(3) { left:14px; top:4px; width:16px; border-left:none; transform:translate(0,0); display:none; }
.kopfknopf { color:#fff !important; background:rgba(255,255,255,.14) !important; border:1px solid rgba(255,255,255,.3) !important; }
.kopfknopf:hover { background:rgba(255,255,255,.26) !important; }

/* Knöpfe */
button, .knopf { font:inherit; font-weight:600; color:var(--text); background:var(--knopf); border:1px solid var(--rand); border-radius:10px;
  padding:7px 12px; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:6px; justify-content:center; min-height:34px;
  touch-action:manipulation; user-select:none; -webkit-user-select:none; transition:background .15s, transform .1s; }
button:hover, .knopf:hover { background:var(--knopfh); }
button:active { transform:scale(.97); }
button:disabled { opacity:.45; cursor:default; transform:none; }
button.haupt, .knopf.haupt { color:#fff; border:none; background:linear-gradient(90deg,#7c3aed,#c026d3 60%,#f59e0b); box-shadow:0 4px 14px rgba(124,58,237,.35); }
button.haupt:hover, .knopf.haupt:hover { filter:brightness(1.1); }
button.haupt:disabled { background:var(--panel2); color:var(--leise); box-shadow:none; }
button.gross { font-size:16px; padding:11px 22px; border-radius:14px; }
button.stopp { background:#ef4444; color:#fff; border:none; }
button.gefahr { color:#f87171; }
body.hell button.gefahr { color:#dc2626; }
button.an { background:linear-gradient(90deg,#7c3aed,#a855f7) !important; color:#fff !important; border-color:transparent !important; }
button.rund { width:44px; height:44px; border-radius:50%; font-size:18px; padding:0; color:#fff; border:none; background:linear-gradient(135deg,#7c3aed,#c026d3); }
.klein-knopf { min-height:30px; padding:4px 10px; font-size:12.5px; }
.breit { width:100%; }
.knopfreihe { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:6px 0; }
.knopfreihe.drei > * { flex:1; }

/* Felder */
select, input[type=number] { font:inherit; color:var(--text); background:var(--panel2); border:1px solid var(--rand); border-radius:8px; padding:5px 8px; min-height:32px; }
input[type=number] { width:86px; }
input[type=color] { width:46px; height:30px; border:1px solid var(--rand); border-radius:8px; background:none; padding:2px; cursor:pointer; }
input[type=range] { accent-color:#a855f7; flex:1; min-width:60px; }
label.feld { display:grid; grid-template-columns:96px 1fr; align-items:center; gap:8px; margin:6px 0; font-size:13px; color:var(--leise); }
label.feld select { width:100%; }
label.regler { display:flex; align-items:center; gap:8px; margin:6px 0; font-size:13px; color:var(--leise); }
label.regler > input[type=range] { flex:1; }
label.regler output { min-width:52px; text-align:right; color:var(--text); font-variant-numeric:tabular-nums; }
label.regler:first-letter { text-transform:uppercase; }
label.haken { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--leise); margin:4px 0; cursor:pointer; }
label.mini { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--leise); }
.wahl { display:flex; flex-direction:column; gap:4px; margin:8px 0; padding:8px 10px; border-radius:10px; background:var(--panel2); }
.wahl label { display:flex; gap:8px; align-items:center; cursor:pointer; }

/* Mitte */
.mitte { display:grid; grid-template-columns:280px minmax(320px,1fr) 340px; gap:10px; }
.panel { background:var(--panel); border:1px solid var(--rand); border-radius:16px; padding:10px 12px; min-width:0; box-shadow:0 4px 18px var(--schatten); }
.pkopf { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:space-between; }
#pBilder { display:flex; flex-direction:column; max-height:calc(100vh - 120px); }
.liste { list-style:none; margin:6px 0 0; padding:0; overflow:auto; flex:1; }
.liste li { display:flex; align-items:center; gap:8px; padding:5px; border-radius:10px; cursor:pointer; border:1px solid transparent; margin-bottom:3px; background:var(--panel); }
.liste li:hover { background:var(--panel2); }
.liste li.gewaehlt { background:var(--panel2); border-color:var(--akz2); }
.liste li.zieh { opacity:.95; box-shadow:0 10px 24px var(--schatten); position:relative; z-index:3; border-color:var(--akz3); }
.liste li.ueber { box-shadow:inset 0 3px 0 var(--akz3); }
.liste .griff { touch-action:none; cursor:grab; color:var(--leise); font-size:18px; padding:4px 2px; }
.liste .nr { width:24px; height:24px; border-radius:50%; flex:none; display:grid; place-items:center; font-size:12px; font-weight:700; color:#fff;
  background:linear-gradient(135deg,#7c3aed,#c026d3); }
.liste img { width:46px; height:46px; object-fit:cover; border-radius:8px; flex:none; background:var(--panel2); }
.liste .tx { flex:1; min-width:0; font-size:12.5px; }
.liste .tx b { display:block; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.liste .tx span { color:var(--leise); font-size:11.5px; }
.liste .weg { min-height:26px; padding:2px 7px; background:none; border:none; color:var(--leise); }
.liste .weg:hover { color:#f87171; }
.liste-leer { color:var(--leise); text-align:center; padding:30px 10px; border:2px dashed var(--rand); border-radius:14px; margin-top:8px; }

/* Bühne */
.buehne-panel { display:flex; flex-direction:column; gap:8px; }
.buehne-rahmen { position:relative; flex:1; min-height:420px; border-radius:12px; overflow:hidden; display:flex; align-items:center; justify-content:center;
  background:repeating-conic-gradient(var(--panel2) 0 25%, var(--panel) 0 50%) 0 0/24px 24px; }
#vorschau { height:min(68vh, 760px); max-width:100%; aspect-ratio:9/16; border-radius:10px; box-shadow:0 10px 40px rgba(0,0,0,.45); transform-origin:center; cursor:grab; touch-action:none; }
.ablage { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; text-align:center; padding:20px;
  background:radial-gradient(circle at 50% 40%, #3b1d70, #120e20 72%); color:#fff; }
body.hell .ablage { background:radial-gradient(circle at 50% 40%, #ddd0ff, #f6f2ff 72%); color:var(--text); }
body:not(.leer) .ablage { display:none; }
.ablage h2 { font-size:22px; }
.ablage p { margin:0; }
.wuerfel-deko { position:relative; width:110px; height:110px; margin-bottom:8px; animation:schweben 3.5s ease-in-out infinite; }
.wuerfel-deko i { position:absolute; width:70px; height:70px; border-radius:10px; border:3px solid #fbbf24; }
.wuerfel-deko i:nth-child(1) { left:8px; top:30px; background:linear-gradient(135deg,#7c3aed,#c026d3); }
.wuerfel-deko i:nth-child(2) { left:30px; top:8px; background:rgba(255,255,255,.08); }
.wuerfel-deko i:nth-child(3) { display:none; }
@keyframes schweben { 0%,100% { transform:translateY(0) rotate(-6deg); } 50% { transform:translateY(-10px) rotate(6deg); } }
.spielleiste { display:flex; align-items:center; gap:10px; }
.spielleiste input { flex:1; }
.zeit { font-variant-numeric:tabular-nums; min-width:92px; color:var(--leise); font-size:13px; }

/* Einstellungen */
.einst { overflow:auto; max-height:calc(100vh - 120px); }
.gruppe { padding:6px 2px 10px; border-bottom:1px solid var(--rand); margin-bottom:6px; }
.gruppe:last-child { border-bottom:none; }
.gruppe h2 { margin-bottom:6px; }
#gBild { background:linear-gradient(180deg,rgba(168,85,247,.10),transparent); border-radius:12px; padding:8px; border:1px solid var(--rand); }
.editor-zeile { display:flex; gap:10px; align-items:flex-start; }
#editor { width:170px; height:170px; border-radius:10px; cursor:grab; touch-action:none; box-shadow:0 4px 16px var(--schatten); flex:none; }
.editor-info { display:flex; flex-direction:column; gap:6px; font-size:13px; color:var(--leise); min-width:0; }
.editor-info select { width:100%; margin-top:3px; }
.musik-karte { display:flex; flex-direction:column; padding:8px 10px; border-radius:10px; margin-bottom:4px;
  background:linear-gradient(90deg,rgba(124,58,237,.18),rgba(6,182,212,.12)); border:1px solid var(--rand); }
.musik-karte b { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.leer #pEinst, body.leer #pSpur, body.leer #pExport { opacity:.45; pointer-events:none; filter:saturate(.6); }

/* Taktspur */
.spur-rahmen { overflow-x:auto; overflow-y:hidden; border-radius:10px; border:1px solid var(--rand); background:var(--spurbg); margin-top:6px; }
#spur { display:block; height:118px; touch-action:pan-x; cursor:pointer; }
.hinweise:empty { display:none; }
.hinweise { margin-top:6px; padding:8px 10px; border-radius:10px; background:rgba(245,158,11,.14); border:1px solid rgba(245,158,11,.4); font-size:13px; }

/* Export */
.export { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.fortschritt { display:flex; align-items:center; gap:10px; flex:1; min-width:280px; }
.balken { flex:1; height:14px; background:var(--panel2); border-radius:7px; overflow:hidden; }
#balken { height:100%; width:0; background:linear-gradient(90deg,#7c3aed,#c026d3,#f59e0b); border-radius:7px; transition:width .2s; }
.fertig { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

/* Fuß */
.fuss { display:flex; align-items:center; gap:12px; padding:6px 4px; font-size:12.5px; flex-wrap:wrap; }
.werbung { color:var(--leise); text-decoration:none; padding:6px 12px; border-radius:20px; border:1px solid var(--rand); background:var(--panel); }
.werbung:hover { color:var(--text); border-color:var(--akz2); }
.werbung b { color:var(--akz1); }
.signatur { color:var(--leise); }

/* Überlagerungen */
.zieh { position:fixed; inset:0; z-index:50; display:flex; align-items:center; justify-content:center; background:rgba(76,29,149,.55); backdrop-filter:blur(3px); pointer-events:none; }
.zieh div { font-size:26px; font-weight:700; color:#fff; padding:30px 50px; border:3px dashed #fde68a; border-radius:24px; }
.dialog { position:fixed; inset:0; z-index:60; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.5); }
.dbox { background:var(--panel); color:var(--text); border:1px solid var(--rand); border-radius:16px; padding:18px 20px; max-width:420px; box-shadow:0 20px 50px rgba(0,0,0,.5); }
.dbox p { margin:0 0 12px; font-size:15px; }
.dbox .knopfreihe { justify-content:flex-end; }
.toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%) translateY(20px); opacity:0; transition:.25s; z-index:70; pointer-events:none;
  background:#2a2148; color:#fff; padding:10px 18px; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.4); max-width:90vw; text-align:center; }
.toast.zeigen { opacity:1; transform:translateX(-50%); }

/* Schmal / Handy */
@media (max-width:1180px) { .mitte { grid-template-columns:240px 1fr 300px; } }
@media (max-width:980px) {
  #app { padding:8px; }
  .mitte { grid-template-columns:1fr; }
  .buehne-panel { order:-1; }
  #vorschau { height:min(62vh, 640px); }
  #pBilder, .einst { max-height:none; }
  .liste { max-height:300px; }
  .nur-breit { display:none !important; }
  .kopf h1 { font-size:21px; }
}
