/* =============================================
   ANKIE OP KAMP — STUDIO (opnames / animatie)
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%; width: 100%;
  font-family: 'Nunito', sans-serif;
  background: #0b1120; color: #e2e8f0;
  overflow: hidden;
}

/* ── PIN ─────────────────────────────────────── */
#pin-screen {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0b1120 0%, #1e3a5f 100%);
}
.pin-box { width: 320px; text-align: center; padding: 2rem; }
.pin-box .logo { font-size: 3.4rem; margin-bottom: 0.6rem; }
.pin-box h1 { font-size: 1.6rem; font-weight: 900; color: #fbbf24; margin-bottom: 0.3rem; }
.pin-box p { color: #94a3b8; font-size: 0.9rem; margin-bottom: 1.2rem; }
.pin-box input {
  width: 100%; text-align: center; letter-spacing: 0.4em; font-size: 1.4rem;
  background: #0f172a; border: 2px solid #334155; border-radius: 10px;
  color: #fff; padding: 0.6rem; font-family: 'Nunito', sans-serif; margin-bottom: 0.8rem;
}
.pin-box button {
  width: 100%; background: #3b82f6; color: #fff; border: none; border-radius: 10px;
  padding: 0.7rem; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1rem; cursor: pointer;
}
.pin-fout { color: #fca5a5; font-weight: 700; margin-top: 0.7rem; font-size: 0.85rem; }

/* ── Layout ──────────────────────────────────── */
#studio { position: fixed; inset: 0; display: flex; flex-direction: column; }

#studio-top {
  height: 52px; min-height: 52px;
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0 0.9rem;
  background: #111c33; border-bottom: 1px solid #24344d;
  z-index: 30;
}
#studio-top .brand { font-weight: 900; color: #fbbf24; font-size: 1rem; white-space: nowrap; }
#studio-top select {
  background: #0f172a; border: 1px solid #334155; border-radius: 8px;
  color: #e2e8f0; font-family: 'Nunito', sans-serif; font-size: 0.85rem;
  padding: 0.35rem 0.5rem; max-width: 260px;
}
#studio-top button {
  background: #1e293b; border: 1px solid #334155; border-radius: 8px;
  color: #cbd5e1; font-family: 'Nunito', sans-serif; font-weight: 700;
  font-size: 0.78rem; padding: 0.35rem 0.7rem; cursor: pointer; white-space: nowrap;
}
#studio-top button:hover { border-color: #3b82f6; color: #fff; }
#opname-info { font-size: 0.78rem; color: #7f8ea8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }

#studio-main { flex: 1; display: flex; min-height: 0; position: relative; }
#studio-map { flex: 1; position: relative; background: #0b1120; }

/* ── Zijpaneel ───────────────────────────────── */
#studio-paneel {
  width: 336px; min-width: 336px;
  background: #111c33; border-left: 1px solid #24344d;
  display: flex; flex-direction: column; min-height: 0; z-index: 20;
}
.paneel-tabs { display: flex; border-bottom: 1px solid #24344d; }
.paneel-tabs button {
  flex: 1; background: none; border: none; border-bottom: 2px solid transparent;
  color: #7f8ea8; font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 0.72rem; padding: 0.55rem 0.2rem; cursor: pointer;
}
.paneel-tabs button.active { color: #fbbf24; border-bottom-color: #fbbf24; background: #16233c; }
.paneel-body { flex: 1; overflow-y: auto; padding: 0.8rem; }
.paneel-body section { display: none; }
.paneel-body section.actief { display: block; }

.blok {
  background: #0f172a; border: 1px solid #24344d; border-radius: 10px;
  padding: 0.7rem 0.8rem; margin-bottom: 0.7rem;
}
.blok h4 { font-size: 0.78rem; color: #fbbf24; margin-bottom: 0.55rem; letter-spacing: 0.02em; }
.blok p.hint { font-size: 0.72rem; color: #64748b; line-height: 1.4; margin-top: 0.35rem; }

.rij { display: flex; gap: 0.4rem; align-items: center; margin-bottom: 0.45rem; }
.rij label { font-size: 0.74rem; color: #94a3b8; min-width: 62px; }
.rij input[type=range] { flex: 1; accent-color: #3b82f6; }
.rij input[type=text], .rij input[type=number] {
  flex: 1; min-width: 0; background: #0b1120; border: 1px solid #334155; border-radius: 7px;
  color: #e2e8f0; font-family: 'Nunito', sans-serif; font-size: 0.78rem; padding: 0.35rem 0.45rem;
}
.rij select {
  flex: 1; background: #0b1120; border: 1px solid #334155; border-radius: 7px;
  color: #e2e8f0; font-family: 'Nunito', sans-serif; font-size: 0.78rem; padding: 0.32rem 0.4rem;
}
.rij .waarde { font-size: 0.72rem; color: #93c5fd; min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

.knop {
  background: #1e3a5f; border: 1px solid #2c4a75; border-radius: 8px;
  color: #93c5fd; font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 0.76rem; padding: 0.42rem 0.6rem; cursor: pointer;
}
.knop:hover { background: #24476f; color: #dbeafe; }
.knop.vast { background: #3b82f6; border-color: #60a5fa; color: #fff; }
.knop.rood { background: #7f1d1d; border-color: #991b1b; color: #fca5a5; }
.knop.groen { background: #14532d; border-color: #166534; color: #86efac; }
.knoppenrij { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.lijst { display: flex; flex-direction: column; gap: 0.3rem; }
.item {
  display: flex; align-items: center; gap: 0.4rem;
  background: #0b1120; border: 1px solid #24344d; border-radius: 7px;
  padding: 0.33rem 0.45rem; font-size: 0.72rem; cursor: pointer;
}
.item:hover { border-color: #3b82f6; }
.item.geselecteerd { border-color: #fbbf24; background: #16233c; }
.item .tijd { color: #93c5fd; font-weight: 800; font-variant-numeric: tabular-nums; }
.item .info { flex: 1; color: #7f8ea8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item button { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 0.8rem; }
.item .chip { background: #1e3a5f; color: #93c5fd; border-radius: 50px; padding: 0.05rem 0.4rem; font-size: 0.65rem; font-weight: 800; }

/* ── Tijdlijn ────────────────────────────────── */
#studio-tijdlijn {
  height: 156px; min-height: 156px;
  background: #111c33; border-top: 1px solid #24344d;
  display: flex; flex-direction: column; z-index: 25;
}
.tl-controls {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.35rem 0.8rem; border-bottom: 1px solid #1b2b45;
}
#btn-play {
  width: 34px; height: 34px; border-radius: 50%; border: none; background: #3b82f6;
  color: #fff; font-size: 0.9rem; cursor: pointer; flex-shrink: 0;
}
#btn-play:hover { background: #2563eb; }
#tl-klok { font-weight: 900; font-size: 0.95rem; color: #fbbf24; font-variant-numeric: tabular-nums; }
#tl-datum { font-size: 0.76rem; color: #94a3b8; font-variant-numeric: tabular-nums; }
#tl-positie { font-size: 0.72rem; color: #64748b; font-variant-numeric: tabular-nums; }
#tl-duur { font-size: 0.72rem; color: #7f8ea8; margin-left: auto; font-variant-numeric: tabular-nums; }

#tl-body { position: relative; flex: 1; padding: 0.35rem 0.8rem 0.5rem; cursor: crosshair; user-select: none; }
#tl-ruler { position: relative; height: 16px; margin-bottom: 2px; }
.tl-tick {
  position: absolute; top: 0; transform: translateX(-50%);
  font-size: 0.62rem; color: #64748b; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tl-tick::before {
  content: ''; position: absolute; left: 50%; top: 11px; width: 1px; height: 5px; background: #334155;
}
.tl-rij {
  position: relative; height: 22px; margin-top: 3px;
  background: #0d1526; border-radius: 5px; border: 1px solid #1b2b45;
}
.tl-rij-label {
  position: absolute; left: 4px; top: 3px; font-size: 0.6rem; color: #475569;
  pointer-events: none; text-transform: uppercase; letter-spacing: 0.06em;
}
.tl-mark {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 9px; height: 9px; border-radius: 2px; cursor: pointer;
  border: 1.5px solid rgba(0,0,0,0.5);
}
.tl-mark.moment { border-radius: 50%; width: 8px; height: 8px; }
.tl-mark.camera { background: #fbbf24; transform: translate(-50%, -50%) rotate(45deg); }
.tl-mark.camera.volg { background: #22c55e; }
.tl-mark.tijd { background: #a855f7; clip-path: polygon(50% 0, 100% 100%, 0 100%); border: none; width: 10px; height: 10px; }
.tl-mark:hover { filter: brightness(1.4); }
#tl-playhead {
  position: absolute; top: 6px; bottom: 0; width: 2px; background: #ef4444;
  pointer-events: none; z-index: 5;
}
#tl-playhead::before {
  content: ''; position: absolute; top: -4px; left: -4px;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 7px solid #ef4444;
}

/* ── Programmabeeld (preview van wat er geëxporteerd wordt) ── */
#monitor {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none; z-index: 6;
}

/* ── Toast ───────────────────────────────────── */
#studio-toast {
  position: fixed; bottom: 172px; left: 50%; transform: translateX(-50%) translateY(30px);
  background: #1e293b; border: 1px solid #334155; border-radius: 50px;
  padding: 0.5rem 1.2rem; font-weight: 700; font-size: 0.82rem; color: #e2e8f0;
  opacity: 0; transition: opacity 0.25s, transform 0.25s; z-index: 9998;
  pointer-events: none; max-width: 80vw; text-align: center;
}
#studio-toast.zichtbaar { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Export-overlay ──────────────────────────── */
#export-overlay {
  position: fixed; inset: 0; z-index: 9997; display: none;
  align-items: center; justify-content: center; flex-direction: column; gap: 0.5rem;
  background: rgba(3,7,18,0.86); color: #e2e8f0; text-align: center; padding: 2rem;
}
#export-overlay.zichtbaar { display: flex; }
#export-overlay .groot { font-size: 1.05rem; font-weight: 800; }
#export-overlay .klein { font-size: 0.8rem; color: #94a3b8; }
#export-balk { width: 320px; height: 6px; background: #1e293b; border-radius: 99px; overflow: hidden; }
#export-balk span { display: block; height: 100%; width: 0; background: #3b82f6; }

/* ── Klein scherm ────────────────────────────── */
@media (max-width: 1100px) {
  #studio-paneel { width: 290px; min-width: 290px; }
  #studio-tijdlijn { height: 140px; min-height: 140px; }
}
