/* Easy 3D Viewer - 前端样式 */

.e3dv {
  touch-action: none;
  background: #eef2f8;
}

.e3dv canvas {
  display: block;
}

/* 加载指示 */
.e3dv-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
  font-size: 13px;
  color: #445;
}

.e3dv-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #dfe6ff;
  border-top-color: #5b7cfa;
  animation: e3dv-spin 0.9s linear infinite;
}

/* 加载进度条 */
.e3dv-bar {
  width: 200px;
  height: 8px;
  background: rgba(120, 140, 180, 0.25);
  border-radius: 6px;
  overflow: hidden;
}

.e3dv-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #5b7cfa, #7c5bfa);
  border-radius: 6px;
  transition: width 0.2s ease;
}

.e3dv-pct {
  font-size: 12px;
  color: #445;
  font-weight: 500;
}

@keyframes e3dv-spin {
  to { transform: rotate(360deg); }
}

.e3dv-err {
  color: #b32d2e;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 16px;
  border-radius: 8px;
}

/* 工具栏 */
.e3dv-toolbar {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.e3dv:hover .e3dv-toolbar,
.e3dv:focus-within .e3dv-toolbar {
  opacity: 1;
}

.e3dv-toolbar button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #444;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.e3dv-toolbar button:hover {
  background: #e8eeff;
  border-color: #7c9cff;
  color: #3a5fd9;
}

.e3dv-toolbar button.on {
  background: #3a5fd9;
  border-color: #3a5fd9;
  color: #fff;
}

/* 全屏时保持铺满 */
.e3dv:fullscreen {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

/* 移动端触控优化 */
@media (hover: none) {
  .e3dv-toolbar {
    opacity: 0.85;
  }
}
