@font-face {
  font-family: 'PP Neue Montreal';
  src: url('/assets/fonts/PPNeueMontreal-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --blue: #4168f6;
  --blue-dark: #2f52d6;
  --blue-soft: #eef2fe;
  --ink: #0e1424;
  --muted: #5d6578;
  --line: #e4e7ef;
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --danger: #c4314b;
  --ok: #1f8a4c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14, 20, 36, 0.06), 0 12px 32px rgba(14, 20, 36, 0.10);
  --font: 'PP Neue Montreal', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.01em; margin: 0; }
button, input, select { font: inherit; color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Knoppen en velden */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent;
  background: var(--blue); color: #fff; cursor: pointer; font-size: 15px;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--blue-dark); text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; color: var(--muted); }
.input {
  height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; outline: none; transition: border-color 0.15s, box-shadow 0.15s; width: 100%;
}
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(65, 104, 246, 0.18); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.msg { font-size: 14px; border-radius: 10px; padding: 10px 12px; margin-bottom: 16px; }
.msg-error { background: #fdecef; color: var(--danger); }
.msg-ok { background: #e9f6ef; color: var(--ok); }

/* Kop en voet */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 32px; border-bottom: 1px solid var(--line);
}
.topbar .logo img { height: 26px; display: block; }
.topbar nav { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--muted); }
.topbar nav .who { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font-size: 14px; }
.link-btn:hover { text-decoration: underline; }
.footer { margin-top: auto; padding: 24px 32px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.footer-inner { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Inlogscherm */
.login-wrap { flex: 1; display: grid; place-items: center; padding: 48px 16px; background: var(--bg-soft); }
.login-card {
  width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; padding: 36px 32px; box-shadow: var(--shadow);
}
.login-card .logo { height: 28px; display: block; margin-bottom: 28px; }
.login-card h1 { font-size: 26px; margin-bottom: 6px; }
.login-card .sub { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.login-card .btn { width: 100%; margin-top: 4px; }
.login-help { font-size: 13px; color: var(--muted); margin: 16px 0 0; }
.privacy {
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted); line-height: 1.55;
}
.privacy p { margin: 0 0 8px; }
.privacy p:last-child { margin-bottom: 0; }

/* Demopagina */
.page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 40px 32px 56px; }
.intro { max-width: 760px; margin-bottom: 28px; }
.intro .recon { height: 26px; display: block; margin-bottom: 18px; }
.intro h1 { font-size: 34px; line-height: 1.15; margin-bottom: 12px; }
.intro p { color: var(--muted); margin: 0 0 10px; font-size: 17px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); }
.note { font-size: 13px; color: var(--muted); margin-top: 18px; }

/* Speler */
.player { position: relative; }
.screen-area { position: relative; }
.stage {
  position: relative; width: 100%; aspect-ratio: 1908 / 968;
  border-radius: var(--radius); overflow: hidden; background: #f2f3f7;
  box-shadow: var(--shadow); border: 1px solid var(--line); cursor: pointer;
}
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }

.overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.35); transition: opacity 0.2s;
}
.big-play {
  display: inline-flex; align-items: center; gap: 12px; height: 60px; padding: 0 26px 0 20px;
  border-radius: 999px; border: 0; background: var(--blue); color: #fff; font-size: 18px;
  cursor: pointer; box-shadow: 0 10px 30px rgba(65, 104, 246, 0.35);
}
.big-play:hover { background: var(--blue-dark); }
.big-play svg { width: 26px; height: 26px; }
.spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 4px solid rgba(65, 104, 246, 0.2); border-top-color: var(--blue);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.overlay.spinner-only { background: transparent; pointer-events: none; }
.player-error { position: absolute; left: 16px; right: 16px; top: 16px; margin: 0; }

/* Cameo-bubbel */
.cameo {
  position: absolute; width: clamp(96px, 17%, 200px); aspect-ratio: 1; z-index: 3;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  transition: left 0.25s ease, top 0.25s ease, right 0.25s ease, bottom 0.25s ease;
}
.cameo.dragging { cursor: grabbing; transition: none; }
.cameo.corner-br { right: 18px; bottom: 18px; }
.cameo.corner-bl { left: 18px; bottom: 18px; }
.cameo.corner-tr { right: 18px; top: 18px; }
.cameo.corner-tl { left: 18px; top: 18px; }
.cameo-circle {
  width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  border: 3px solid var(--blue); background: #dfe3ec;
  box-shadow: 0 8px 26px rgba(14, 20, 36, 0.25);
}
.cameo video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.cameo-hide {
  position: absolute; top: 2%; right: 2%; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
  display: grid; place-items: center; opacity: 0; transition: opacity 0.15s;
  box-shadow: 0 2px 8px rgba(14, 20, 36, 0.15);
}
.cameo:hover .cameo-hide, .cameo:focus-within .cameo-hide { opacity: 1; }
.cameo-hide svg { width: 14px; height: 14px; }
.cameo-caption { display: none; }

/* Bedieningsbalk */
.controls {
  display: flex; align-items: center; gap: 6px; margin-top: 14px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.ctrl {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer;
}
.ctrl:hover { background: var(--bg-soft); }
.ctrl svg { width: 22px; height: 22px; }
.ctrl.text { width: auto; padding: 0 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.ctrl.active { color: var(--blue); }
.time { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0 6px; }
.range {
  -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(to right, var(--blue) var(--pct, 0%), var(--line) var(--pct, 0%));
}
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.seek { flex: 1; min-width: 60px; }
.vol { width: 84px; }
.sep { flex: none; width: 1px; height: 24px; background: var(--line); margin: 0 4px; }

/* Volledig scherm */
.player:fullscreen { background: #fff; padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.player:fullscreen .screen-area { width: min(100%, calc((100vh - 120px) * 1908 / 968)); margin: 0 auto; }
.player:fullscreen .controls { width: min(100%, calc((100vh - 120px) * 1908 / 968)); margin: 14px auto 0; }
.player:-webkit-full-screen { background: #fff; padding: 24px; display: flex; flex-direction: column; justify-content: center; width: 100%; height: 100%; }

/* Admin */
.admin h1 { font-size: 30px; margin-bottom: 6px; }
.admin .lead { color: var(--muted); margin: 0 0 28px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 32px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.card .k { font-size: 13px; color: var(--muted); }
.card .v { font-size: 26px; margin-top: 2px; }
.panel { border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2 { font-size: 20px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row .field { margin: 0; flex: 1 1 220px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 400; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--bg-soft); }
tr.selected td { background: var(--blue-soft); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.ua { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); }
.tag.ok { background: #e9f6ef; color: var(--ok); }
.tag.bad { background: #fdecef; color: var(--danger); }
.tag.blue { background: var(--blue-soft); color: var(--blue-dark); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; background: #fff; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 14px; }
.tabs button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }

/* Smalle schermen */
@media (max-width: 860px) {
  .topbar { padding: 14px 16px; }
  .topbar nav .who { display: none; }
  .page { padding: 28px 16px 40px; }
  .intro h1 { font-size: 27px; }
  .intro p { font-size: 16px; }
  .vol, .vol-sep { display: none; }
  .footer { padding: 20px 16px; }
}

@media (max-width: 560px) {
  .stage { border-radius: 10px; }
  /* Cameo onder het scherm in plaats van erover */
  .cameo, .cameo.corner-br, .cameo.corner-bl, .cameo.corner-tr, .cameo.corner-tl {
    position: relative; inset: auto; width: 100%; aspect-ratio: auto; cursor: default;
    display: flex; align-items: center; gap: 14px; margin-top: 14px; transition: none;
  }
  .cameo-circle { width: 104px; height: 104px; flex: none; }
  .cameo-hide { display: none; }
  .cameo-caption { display: block; font-size: 14px; color: var(--muted); }
  .cameo-caption strong { display: block; font-weight: 400; color: var(--ink); font-size: 15px; }
  .controls { gap: 2px; padding: 6px; flex-wrap: wrap; }
  .controls .seek { order: -1; flex-basis: 100%; margin: 6px 4px 8px; }
  .ctrl { width: 38px; height: 38px; }
  .ctrl-cameo, .sep, .kbd-hint { display: none; }
  .login-card { padding: 28px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 0.01ms !important; }
}
