/* 3D模型预览器样式 */
.model-viewer-container {
  margin-top: 20px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background-color: #2a2a2a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.viewer-header h4 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
}

.close-viewer {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  padding: 0 5px;
  line-height: 1;
}

.viewer-content {
  position: relative;
  width: 100%;
  height: 400px;
}

.model-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 10;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #5b00d7;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

.loading-text {
  color: #ffffff;
  font-size: 14px;
}

.model-error {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 59, 48, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  display: none;
  z-index: 20;
}

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

.tripo3d-loading:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    margin-left: -24px;
    margin-top: -24px;
    border-radius: 50%;
    border: 6px solid #333;
    border-color: #333 transparent #333 transparent;
    animation: tripo3d-loading 1.2s linear infinite;
}

.tripo3d-light-theme .tripo3d-loading:after {
    border-color: #eee transparent #eee transparent;
}

.tripo3d-loading.tripo3d-progress:after {
    border-top-color: #5b00d7;
} 