:root{
  --bg:#0b0e14; --panel:rgba(0,0,0,.55); --fg:#eef2f7; --muted:#a8b0bd; --accent:#4ea1ff;
  --radius:14px; --gap:12px; --barH:64px; --barPad:10px;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{
  background:#0b0e14;
  color:var(--fg);
  font:15px/1.55 system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial;
}

/* Obere Zeile ausblenden (falls vorhanden) */
.logo1, #top-border{ display:none !important; }

/* Vollbild-Bildfläche (Standardansicht = “contain”) */
#main_pict{
  position:fixed;
  top:0; left:0; right:0;
  height:calc(100vh - (var(--barH) + var(--barPad)*2 + 6px));
  width:100vw;
  object-fit:contain;
  background:#0a0d11;
  border:0;
  margin:0 auto;
  display:block;
  box-shadow:none;
}
#cache_pict{ display:none !important; }

/* Moderne Steuerleiste unten */
.picker, .controlbar{
  position:fixed;
  left:12px; right:12px; bottom:12px;
  min-height:var(--barH);
  display:flex;
  gap:var(--gap);
  align-items:center;
  justify-content:center;
  padding:var(--barPad);
  background:var(--panel);
  border:1px solid rgba(255,255,255,.08);
  border-radius:var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index:1000;
  flex-wrap:wrap;
}
.cb-group{ display:flex; align-items:center; gap:var(--gap); flex-wrap:wrap; }

/* Icon-Buttons */
.cb-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:42px; height:42px;
  border:0; border-radius:10px;
  background:rgba(255,255,255,.08);
  color:var(--fg); cursor:pointer;
  transition: transform .06s ease, background .15s ease, opacity .15s ease;
}
.cb-btn:hover{ background:rgba(255,255,255,.12); }
.cb-btn:active{ transform: translateY(1px); }
.cb-btn svg{ width:22px; height:22px; display:block; }
.cb-btn.primary{ background:rgba(78,161,255,.18); }
.cb-btn.primary:hover{ background:rgba(78,161,255,.24); }

/* Felder (Datum/Zeit) */
.cb-field{
  display:flex; align-items:center; gap:8px;
  padding:6px 10px; border-radius:999px;
  background:rgba(255,255,255,.06);
}
.cb-field label{ color:var(--muted); font-weight:600; font-size:13px; }
.cb-field select, .cb-field input[type="time"], .cb-field input[type="date"], .cb-field input[type="text"]{
  background:transparent; border:0; outline:none; color:var(--fg);
  font:inherit; padding:4px 2px; min-width:8ch;
}

/* Mobile */
@media (max-width: 640px){
  :root{ --barH:72px; --gap:10px; }
  .cb-btn{ width:48px; height:48px; border-radius:12px; }
  #main_pict{ height:calc(100vh - (var(--barH) + var(--barPad)*2 + 12px)); }
  .controlbar{ justify-content:space-between; flex-wrap:nowrap; overflow:auto; }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px){
  #main_pict{ height:calc(100vh - (var(--barH) + var(--barPad)*2 + 10px)); }
}

/* Alte Picker-Leiste sicher ausblenden, falls noch vorhanden */
.picker{ display:none !important; }

/* Optional: alte Play/Stop-Buttons ausblenden (falls noch irgendwo sichtbar) */
#startButton, #stopButton { display:none !important; }

/* ---- Klick-Zoom (Toggle per Klick) ---- */
#main_pict{ cursor: zoom-in; }

body.zoomed {
  overflow: auto;            /* Scrollen erlauben bei großen Bildern */
}
body.zoomed .controlbar{
  opacity: 0;
  pointer-events: none;      /* Leiste kurz ausblenden, damit sie nicht stört */
}
body.zoomed #main_pict{
  position: static;          /* natürliches Layout */
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 16px auto;         /* zentriert */
  cursor: zoom-out;
}

/* Kleines +/−-Badge unten rechts */
.zoom-cue{
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.12);
  color: #eef2f7;
  display: none;             /* nur zeigen, wenn über dem Bild */
  align-items: center; justify-content: center;
  font-weight: 700;
  z-index: 1100;
  backdrop-filter: blur(6px);
}
body:not(.zoomed) .zoom-cue::before{ content: '+'; }
body.zoomed .zoom-cue::before{ content: '−'; }  /* Minus */