*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%;overflow:hidden;background:#000}

/* 视频&图片层 统一样式 */
#video, #photoLayer{
  position:fixed;top:0;left:0;
  width:100vw;height:100vh;
  object-fit:cover;
  transform-origin:center center;
  transition: transform 0.1s ease;
}
#photoLayer{display:none;}

/* 画布层 画笔专用 强制GPU渲染 */
#drawCanvas{
  position:fixed;top:0;left:0;
  width:100vw;height:100vh;
  touch-action:none;
  z-index:10;
  background:transparent;
  transform: translateZ(0);
}

/* 底部工具栏 保留原布局，优化拍照按钮区分 */
.toolbar{
  position:fixed;bottom:12px;left:50%;
  transform:translateX(-50%);
  display:flex;gap:6px;
  padding:8px 10px;
  background:rgba(0,0,0,0.6);
  border-radius:12px;
  z-index:999;
  flex-wrap:wrap;justify-content:center;
  max-width:95vw;align-items:center;
}
.toolbar button{
  padding:6px 10px;
  background:#007bff;color:white;
  border:none;border-radius:6px;
  font-size:14px;white-space:nowrap;
  cursor:pointer;
  touch-action:none;
}
.toolbar button:disabled{
  background:#6c757d;
  opacity:0.7;
  cursor:not-allowed;
}
/* 拍照按钮区分样式，更直观 */
.toolbar #shotOrigin{background:#28a745;}
.toolbar #shotWithNote{background:#ffc107;color:#333;}

.color-box{display:flex;gap:4px;align-items:center}
.color{width:22px;height:22px;border-radius:50%;border:2px solid #fff;cursor:pointer;touch-action:none;}
.color.active{border-color:#ffc107;}
.size-wrap{display:flex;align-items:center;gap:6px;color:#fff}
#sizeRange{width:70px;height:6px;touch-action:none;}

/* 遥感样式 */
.joystick{
  position:fixed;left:20px;bottom:80px;
  width:100px;height:100px;
  background:rgba(0,0,0,0.3);
  border-radius:50%;z-index:999;
  touch-action:none;
}
.joystick-inner{
  position:absolute;width:40px;height:40px;
  background:rgba(255,255,255,0.7);
  border-radius:50%;top:50%;left:50%;
  transform:translate(-50%,-50%);
  transition: transform 0.1s ease;
}

/* 右侧抽屉相册 */
.drawer-toggle {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
  padding: 16px 8px;
  background: rgba(0, 123, 255, 0.8);
  color: white;
  border: none;
  border-radius: 8px 0 0 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  touch-action:none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 2px;
}
.drawer-toggle:hover {
  background: rgba(0, 123, 255, 1);
}
.drawer {
  position: fixed;
  right: 0;
  top: 0;
  width: 0;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  overflow-x: hidden;
  overflow-y: auto;
  transition: width 0.3s ease-in-out;
  padding: 20px 0;
  touch-action:none;
}
.drawer.open {
  width: 280px;
}
.drawer-title {
  color: white;
  font-size: 16px;
  padding: 0 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 12px;
  user-select: none;
}
.drawer-album {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 20px;
}
.drawer-photo-item {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.drawer-photo-item.active {
  border-color: #007bff;
}
.drawer-photo-item img {
  width: 100%;
  height: 160px;
  display: block;
  object-fit: cover;
  loading: eager;
}

/* 模式切换按钮 */
.mode-switch{
  position:fixed;top:10px;left:10px;z-index:999;
  display:flex;gap:4px;
}
.mode-switch button{
  padding:6px 10px;
  border:none;
  border-radius:6px;
  color:white;
  cursor:pointer;
}

/* 拍照成功提示toast */
.toast{
  position:fixed;top:20px;left:50%;transform:translateX(-50%);
  background:rgba(0,0,0,0.8);color:white;
  padding:10px 16px;border-radius:8px;
  z-index:1002;display:none;
  align-items:center;gap:10px;
}
.toast.show{display:flex;}
.toast button{
  padding:4px 8px;background:#007bff;color:white;
  border:none;border-radius:4px;cursor:pointer;
  font-size:12px;
}