body {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  font-family: "Segoe UI", Arial, sans-serif;
}

.viewer-container {
  width: 90%;
  max-width: 600px;
  height: 80vh;
  max-height: 500px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  position: relative;
}

model-viewer {
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 20, 0.8);
  --poster-color: transparent;
}

.loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 20, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.spinner {
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top: 5px solid #00f0ff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Media queries for responsive design */
@media screen and (max-width: 768px) {
  .viewer-container {
    width: 95%;
    height: 70vh;
  }

  .spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
  }
}

@media screen and (max-width: 480px) {
  .viewer-container {
    width: 98%;
    height: 60vh;
    border-radius: 8px;
  }

  .spinner {
    width: 30px;
    height: 30px;
    border-width: 3px;
  }
}
