body {
  margin: 0;
  background: black;
  color: white;
  font-family: Arial, sans-serif;
}

main {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.video-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.shadow-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 32.5vmin, rgba(0, 0, 0, 0.6) 32.6vmin);
  z-index: 3;
  pointer-events: none;
}

.circle-frame {
  width: 65vmin;
  height: 65vmin;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 4;
}

#cameraStatus,
#scanButton,
#similarityLabel,
#similarityBarContainer,
#loadingSpinner,
#result {
  position: relative;
  z-index: 5;
  text-align: center;
}

#scanButton {
  margin: 1rem auto;
  padding: 10px 20px;
  font-size: 1rem;
  background-color: #1e90ff;
  color: white;
  border: none;
  border-radius: 6px;
}

#similarityBarContainer {
  width: 80%;
  height: 10px;
  background: #444;
  margin: 10px auto;
  border-radius: 5px;
  overflow: hidden;
}

#similarityBar {
  height: 100%;
  background: lime;
  width: 0%;
}

#spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
  margin: 10px auto;
}

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

#tiltAngle {
  position: absolute;
  top: 5vh;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  color: yellow;
  font-family: monospace;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 6;
}