.atom-scene {
  width: 100%;
  height: 100%;
  position: relative;
  perspective: 400px;
}

.atom-model {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: atom-y-rotate 12s linear infinite;
}

@keyframes atom-y-rotate {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

.atom-nucleus {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff9a3c, #e05a00);
  box-shadow: 0 0 10px rgba(255, 120, 30, 0.6), 0 0 24px rgba(255, 100, 0, 0.3);
  z-index: 2;
}

.atom-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(80, 130, 220, 0.35);
  transform-style: preserve-3d;
  /* width, height, margin-left, margin-top, and rotateX set by JS */
}

.electron-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  animation: electron-orbit var(--duration, 3s) linear infinite;
}

@keyframes electron-orbit {
  from { transform: rotate(var(--start-angle, 0deg)); }
  to   { transform: rotate(calc(var(--start-angle, 0deg) + 360deg)); }
}

.atom-electron {
  position: absolute;
  top: 0;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  margin-top: -3px;
  border-radius: 50%;
  background: #4fc3f7;
  box-shadow: 0 0 6px #4fc3f7, 0 0 12px rgba(79, 195, 247, 0.5);
}
