.bcc-camera{max-width:1200px;margin:1.5rem auto;background:#07100d;color:#f4f7f8;border-radius:18px;overflow:hidden;box-shadow:0 18px 48px rgba(0,0,0,.32)}
.bcc-video-wrap{position:relative;width:100%;aspect-ratio:16/9;background:#000}
.bcc-video{display:block;width:100%;height:100%;border:0;background:#000}
.bcc-expand-video{position:absolute;top:10px;right:10px;z-index:8;padding:8px 12px;border:1px solid rgba(190,255,205,.7);border-radius:999px;background:rgba(5,20,13,.72);color:#fff;font:700 12px/1.2 system-ui;cursor:pointer;touch-action:manipulation}
.bcc-expand-video:focus-visible{outline:2px solid #8dffab;outline-offset:2px}
.bcc-video-wrap.bcc-video-expanded{position:fixed;inset:0;z-index:999999;width:100vw;height:100vh;height:100dvh;aspect-ratio:auto;background:#000}
html.bcc-page-expanded,html.bcc-page-expanded body{overflow:hidden}
.bcc-empty{display:grid;place-items:center;color:#c6d0d5;padding:1rem;box-sizing:border-box}
.bcc-controller{padding:10px 16px 12px;background:radial-gradient(circle at 50% 0,rgba(70,255,134,.11),transparent 36%),linear-gradient(180deg,#101b18,#050a08);border-top:1px solid rgba(108,255,151,.28);display:grid;grid-template-columns:62px minmax(0,1fr);grid-template-areas:"user user" "speed controls" "status status";column-gap:14px;row-gap:7px;align-items:center}
.bcc-user-row{grid-area:user;display:flex;justify-content:flex-end;margin:0}
.bcc-logout{display:inline-block;border:1px solid #47765a;border-radius:999px;padding:6px 13px;color:#dfffea;background:#0b1511;text-decoration:none;font-weight:700;box-shadow:inset 0 0 0 1px rgba(104,255,151,.05)}
.bcc-logout:hover,.bcc-logout:focus-visible{background:#173124;color:#8cffad;border-color:#73f59b;outline:none;box-shadow:0 0 14px rgba(87,255,140,.22)}
.bcc-speed-row{grid-area:speed;display:flex;justify-content:center;align-self:stretch;margin:0}
.bcc-speed-row label{display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center;color:#aefbc4;font:700 12px/1 system-ui;text-transform:uppercase;letter-spacing:.08em}
.bcc-speed-row input{width:18px;height:94px;margin:0;writing-mode:vertical-lr;direction:rtl;accent-color:#5dff8d;filter:drop-shadow(0 0 5px rgba(70,255,125,.45))}
.bcc-grid{grid-area:controls;position:relative;display:grid;grid-template-columns:repeat(3,54px) 22px minmax(126px,158px) minmax(126px,158px);grid-template-rows:repeat(3,48px);gap:5px 7px;justify-content:center;align-items:center}
.bcc-grid::before{content:"";grid-area:1/1/4/4;width:166px;height:166px;place-self:center;border-radius:50%;background:radial-gradient(circle at 50% 42%,#23352d 0 24%,#111d18 25% 56%,#050906 57%);border:2px solid #315640;box-shadow:inset 0 0 22px rgba(0,0,0,.9),0 0 18px rgba(72,255,128,.15);z-index:0}
.bcc-grid::after{content:"✦";grid-column:2;grid-row:2;width:42px;height:42px;display:grid;place-items:center;place-self:center;border-radius:50%;background:linear-gradient(145deg,#18281f,#07100b);border:1px solid #538669;color:#6dff96;font-size:19px;text-shadow:0 0 8px #42ff79;box-shadow:inset 0 0 10px #000;z-index:1}
.bcc-grid button{min-width:0;min-height:0;height:46px;border:1px solid #355b43;border-radius:12px;background:linear-gradient(145deg,#1a2b22,#08100c);color:#effff3;font:800 16px/1 system-ui;cursor:pointer;touch-action:none;user-select:none;transition:.12s ease;box-shadow:inset 0 1px rgba(255,255,255,.05),0 4px 10px rgba(0,0,0,.35);z-index:2}
.bcc-grid button:nth-child(-n+4){width:50px;height:50px;border-radius:50%;place-self:center;font-size:0;color:#72ff9a}
.bcc-grid button:nth-child(-n+4)::before{font-size:21px;line-height:1;text-shadow:0 0 8px rgba(85,255,136,.72)}
.bcc-grid button:nth-child(1){grid-column:2;grid-row:1}.bcc-grid button:nth-child(1)::before{content:"▲"}
.bcc-grid button:nth-child(2){grid-column:2;grid-row:3}.bcc-grid button:nth-child(2)::before{content:"▼"}
.bcc-grid button:nth-child(3){grid-column:1;grid-row:2}.bcc-grid button:nth-child(3)::before{content:"◀"}
.bcc-grid button:nth-child(4){grid-column:3;grid-row:2}.bcc-grid button:nth-child(4)::before{content:"▶"}
.bcc-grid button:nth-child(5){grid-column:5;grid-row:1}.bcc-grid button:nth-child(6){grid-column:5;grid-row:3}
.bcc-grid button:nth-child(7){grid-column:6;grid-row:1}.bcc-grid button:nth-child(8){grid-column:6;grid-row:3}
.bcc-grid button:nth-child(n+5){border-radius:999px;border-color:#426f51;color:#caffd8;letter-spacing:.02em}
.bcc-grid button:hover,.bcc-grid button:focus-visible{background:linear-gradient(145deg,#254c34,#0c1b12);border-color:#73ff9b;color:#fff;outline:none;box-shadow:0 0 16px rgba(70,255,127,.3),inset 0 1px rgba(255,255,255,.08)}
.bcc-grid button.is-active{background:#1d7a3d;border-color:#8dffab;color:#fff;transform:scale(.94);box-shadow:0 0 22px rgba(70,255,127,.48)}
.bcc-grid .bcc-stop{background:#4b1717;border-color:#9c4d4d}.bcc-grid .bcc-stop:hover{background:#702323}
.bcc-status{grid-area:status;text-align:center;margin:0;color:#9deab4;font-size:14px;letter-spacing:.03em}
@media(max-width:700px){.bcc-camera{border-radius:0}.bcc-controller{padding:10px 4px 12px 18px;grid-template-columns:34px minmax(0,1fr);column-gap:4px;row-gap:6px}.bcc-user-row{margin:0}.bcc-speed-row{margin:0}.bcc-speed-row label{font-size:10px}.bcc-speed-row input{width:18px;height:88px;writing-mode:vertical-lr;direction:rtl}.bcc-grid{grid-template-columns:repeat(3,minmax(0,38px)) 8px repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,38px);gap:4px;justify-content:stretch}.bcc-grid::before{width:122px;height:122px}.bcc-grid::after{width:30px;height:30px;font-size:15px}.bcc-grid button{height:38px;font-size:11px}.bcc-grid button:nth-child(-n+4){width:36px;height:36px;font-size:0}.bcc-grid button:nth-child(-n+4)::before{font-size:17px}.bcc-grid button:nth-child(n+5){padding:2px;letter-spacing:0}.bcc-status{margin:0;font-size:12px}}

/* Phone landscape: joystick on the left; speed, zoom and focus on the right. */
/* The expanded player uses the same overlay in portrait, too. */
  .bcc-camera.bcc-overlay-active .bcc-video-wrap { overflow:hidden; }
  .bcc-camera.bcc-overlay-active .bcc-controller {
    position:absolute;
    z-index:5;
    left:0;
    right:0;
    bottom:max(6px, env(safe-area-inset-bottom));
    box-sizing:border-box;
    width:100%;
    padding:0 max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
    display:block;
    border:0;
    background:transparent;
    box-shadow:none;
    pointer-events:none;
  }
  .bcc-camera.bcc-overlay-active .bcc-user-row { display:none; }
  .bcc-camera.bcc-overlay-active .bcc-status { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
  .bcc-camera.bcc-overlay-active .bcc-speed-row {
    position:absolute;
    right:calc(max(8px, env(safe-area-inset-right)) + 130px);
    bottom:4px;
    width:38px;
    height:110px;
    align-items:center;
    border:1px solid rgba(175,255,196,.5);
    border-radius:14px;
    background:rgba(5,20,13,.58);
    -webkit-backdrop-filter:blur(5px);
    backdrop-filter:blur(5px);
    pointer-events:auto;
  }
  .bcc-camera.bcc-overlay-active .bcc-speed-row label { font-size:9px;letter-spacing:0; }
  .bcc-camera.bcc-overlay-active .bcc-speed-row input { height:72px; }
  .bcc-camera.bcc-overlay-active .bcc-grid {
    width:100%;
    grid-template-columns:repeat(3,40px) minmax(0,1fr) repeat(2,60px);
    grid-template-rows:repeat(3,40px);
    gap:4px;
    justify-content:stretch;
    pointer-events:none;
  }
  .bcc-camera.bcc-overlay-active .bcc-grid::before { width:128px;height:128px;background:radial-gradient(circle,rgba(17,44,28,.52),rgba(5,16,10,.65));border-color:rgba(155,255,186,.52);pointer-events:none; }
  .bcc-camera.bcc-overlay-active .bcc-grid::after { width:30px;height:30px;background:rgba(7,22,13,.7);font-size:14px;pointer-events:none; }
  .bcc-camera.bcc-overlay-active .bcc-grid button { height:40px;font-size:10px;background:rgba(10,36,22,.68);touch-action:none;pointer-events:auto; }
  .bcc-camera.bcc-overlay-active .bcc-grid button:nth-child(-n+4) { width:40px;height:40px;font-size:0; }
  .bcc-camera.bcc-overlay-active .bcc-grid button:nth-child(-n+4)::before { font-size:18px; }
  .bcc-camera.bcc-overlay-active .bcc-grid button:nth-child(n+5) { padding:1px; }

/* DJS_MOBILE_CONTROLS_01: suppress mobile text selection and long-press callouts. */
[data-bcc-controller] .bcc-grid,
[data-bcc-controller] .bcc-grid *,
[data-bcc-controller] .bcc-speed-row,
[data-bcc-controller] .bcc-speed-row * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-drag: none;
}
[data-bcc-controller] .bcc-grid button[data-action] {
  touch-action: none !important;
  -webkit-tap-highlight-color: transparent;
}

/* DJS_FULLSCREEN_CONTROLS_01: reserve the player toolbar, center desktop PTZ. */
.bcc-camera .bcc-video-wrap.bcc-video-expanded .bcc-expand-video {
  top:calc(max(8px, env(safe-area-inset-top)) + 56px);
  right:max(10px, env(safe-area-inset-right));
}
.bcc-camera.bcc-overlay-active .bcc-controller {
  bottom:calc(72px + env(safe-area-inset-bottom));
}
.bcc-camera.bcc-desktop-controls .bcc-controller {
  display:grid;
  grid-template-columns:62px max-content;
  grid-template-areas:"user user" "speed controls" "status status";
  justify-content:center;
  column-gap:14px;
}
.bcc-camera.bcc-desktop-controls .bcc-grid {
  width:auto;
  grid-template-columns:repeat(3,54px) 22px repeat(2,126px);
  grid-template-rows:repeat(3,48px);
  gap:5px 7px;
  justify-content:center;
}
.bcc-camera.bcc-desktop-controls.bcc-overlay-active .bcc-controller {
  left:50%;right:auto;transform:translateX(-50%);
  width:max-content;max-width:100%;
  padding:10px 16px;
  bottom:calc(84px + env(safe-area-inset-bottom));
  border:1px solid rgba(175,255,196,.3);border-radius:18px;
  background:rgba(5,20,13,.45);
}
.bcc-camera.bcc-desktop-controls.bcc-overlay-active .bcc-speed-row {
  position:static;grid-area:speed;
  width:62px;height:144px;align-self:center;
  border:0;background:transparent;
}
.bcc-camera.bcc-desktop-controls.bcc-overlay-active .bcc-speed-row label {
  font-size:11px;
}
.bcc-camera.bcc-desktop-controls.bcc-overlay-active .bcc-speed-row input {
  height:94px;
}
.bcc-camera.bcc-desktop-controls.bcc-overlay-active .bcc-grid::before {
  width:158px;height:158px;
}
.bcc-camera.bcc-desktop-controls.bcc-overlay-active .bcc-grid button {
  height:46px;font-size:13px;
}
.bcc-camera.bcc-desktop-controls.bcc-overlay-active .bcc-grid button:nth-child(-n+4) {
  width:46px;height:46px;font-size:0;
}

/* DJS_NATIVE_FULLSCREEN_01: the browser top layer contains video and controls. */
.bcc-video-wrap.bcc-video-expanded:fullscreen {
  position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;
  margin:0;border:0;border-radius:0;aspect-ratio:auto;box-sizing:border-box;background:#000;
}
.bcc-video-wrap.bcc-video-expanded:-webkit-full-screen {
  position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;
  margin:0;border:0;border-radius:0;aspect-ratio:auto;box-sizing:border-box;background:#000;
}
.bcc-video-wrap::backdrop { background:#000; }
