* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #9f9fb1 25%,
    #9c8eb9 50%,
    #a4c0f7 75%,
    #80b8f0 100%
  );
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  padding: 20px;
  color: #ffffff;
  overflow-x: hidden;
}

.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  gap: 2rem;
}

.header {
  text-align: center;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.2s forwards;
}

.title {
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #000000, #000000, #000000);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.viewers-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 2rem;
}

.viewer-container {
  width: 100%;
  max-width: 800px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 100px rgba(0, 240, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  background: rgba(10, 10, 30, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  animation: fadeInScale 1s ease-out 0.5s forwards;
  padding: 2rem;
}

.viewer-container:hover {
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7), 0 0 120px rgba(0, 240, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

.model-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 1.1rem;
}

model-viewer {
  width: 100%;
  height: 500px;
  border-radius: 16px;
  background: radial-gradient(
    circle at center,
    rgba(20, 20, 40, 0.9),
    rgba(5, 5, 15, 0.95)
  );
  --poster-color: transparent;
  --progress-bar-color: #00f0ff;
  --progress-bar-height: 3px;
}

.loader-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 150px;
  background: rgba(10, 10, 30, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  backdrop-filter: blur(5px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.loader-overlay.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
  pointer-events: none;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid #00f0ff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
  margin-bottom: 1rem;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.loading-text {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: pulse 2s ease-in-out infinite;
}

.controls-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 1s forwards;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-item:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.control-icon {
  width: 24px;
  height: 24px;
  background: rgba(0, 240, 255, 0.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.footer {
  margin-top: 2rem;
  text-align: center;
  opacity: 0;
  animation: fadeInUp 1s ease-out 1.2s forwards;
}

.footer-text {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.8);
  font-weight: 300;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .title {
    font-size: 2.5rem;
  }

  .viewer-container {
    padding: 1.5rem;
  }

  model-viewer {
    height: 400px;
  }

  .spinner {
    width: 50px;
    height: 50px;
  }

  .controls-info {
    gap: 1rem;
  }

  .control-item {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }

  .control-icon {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 2rem;
  }

  .viewer-container {
    padding: 1rem;
  }

  model-viewer {
    height: 300px;
  }

  .controls-info {
    flex-direction: column;
    gap: 0.5rem;
  }

  .spinner {
    width: 40px;
    height: 40px;
  }

  .model-title {
    font-size: 1rem;
  }
}