body {
  font-family: Arial, sans-serif;
}

#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1; /* Ensure canvas is above the blur overlay */
}

#ui {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  padding: 2px;
  top: 0;
  visibility: hidden;
  border-radius: 5px;
  background-color: #1E4357;
  color: #fff;
  width: 100%;
  z-index: 1000;
  transform: translateX(-50%);
  left: 50%;
}

#left-ui, #right-ui {
  display: flex;
  align-items: center;
}

#mode-indicator {
  display: flex;
  padding: 5px;
  margin-right: 5px;
  border-radius: 5px;
  color: #fff;
  width: 150px;
}

#prevChunk, #nextChunk, #export {
  margin: 5px 10px;
  padding: 5px 5px;
  font-size: 12px;
  border: none;
  border-radius: 5px;
  background-color: #000;
  color: #fff;
  cursor: pointer;
}

#selectedFloor {
    background-color: white;
    color: black;
    border-radius: 50%;
    padding: 3px;
    margin-right: 5px;
    margin-left: 5px;
}

#floor {
  padding: 3px;
  margin-right: 5px;
  margin-left: 5px;
}

#prevChunk:hover, #nextChunk:hover {
  background-color: #333;
}

#infobox {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding: 1px;
  color: #fff;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#login-dialog, #save-dialog, #twofa-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 550px;
  height: auto;
  background-color: #1E4357;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 2px solid #fff; /* Added 'solid' to border */
  font-size: 16px;
  color: #fff;
  flex-direction: column;
  visibility: hidden;
  z-index: 950; /* Ensure login is above canvas/blur but below main UI */
}

.input-container {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.twofa-input {
  width: 40px;
  height: 40px;
  font-size: 24px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.dialog-button:disabled {
  background-color: #ccc; /* Gray background */
  color: #666; /* Darker text color */
  cursor: not-allowed; /* Change cursor to indicate disabled state */
  opacity: 0.6; /* Make the button semi-transparent */
}

#save-dialog table {
  width: 100%; /* Adjusted width to fit within the dialog */
  height: auto; /* Adjusted height to fit content */
  padding: 10px; /* Combined padding properties */
  background-color: #1E4357;
  display: flex;
  justify-content: flex-start; /* Corrected value */
  align-items: flex-start; /* Corrected value */
  text-align: left;
  font-size: 16px;
  color: #fff;
  flex-direction: column;
}

#save-dialog input[type="text"] {
  visibility: hidden;
}

.buttons-container {
  width: 100%; /* Ensure this is set to 100% */
  display: flex; /* Ensure this is set to flex */
  justify-content: space-evenly; /* Ensure this is set to space-evenly */
  right: auto; /* These properties are not necessary for flexbox layout */
  left: auto;  /* These properties are not necessary for flexbox layout */
}

.dialog-button {
  margin-bottom: 15px;
  justify-content: center; /* Center content within each button */
  width: auto; /* Adjust width to auto to allow space-evenly to work */
  font-size: 18px;
  border: none;
  border-radius: 5px;
  background-color: #000;
  color: #fff;
  cursor: pointer;
  padding: 10px 20px;
}

#login-dialog form {
  display: flex;
  width: 100%;
  flex-direction: column;
}

#login-dialog label,login-dialog input[type="text"], #login-dialog input[type="password"] {
  flex: 1 0 auto;
  margin: 5px;
}
#login-dialog input[type="text"], #login-dialog input[type="password"] {
  flex: 1 0 auto;
  margin: 5px;
  width: 65%; /* adjust this value as needed */
}

#login-dialog button {
  left: auto;
  right: auto;
  width: 50%;
  margin:10px auto;
}

#login-dialog input[type="checkbox"] {
  flex: 1 0 40%;
}

#drop-area {
  visibility: hidden;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 350px;
  height: 200px;
  background-color: #1E4357;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 2px #fff;
  font-size: 20px;
  color: #fff;
  flex-direction: column;
  visibility: hidden;
  z-index: 900; /* Ensure drop area is above canvas/blur but below modals */
}

.button {
  margin: 10px 20px;
  padding: 10px 20px;
  font-size: 18px;
  border: none;
  border-radius: 5px;
  background-color: #000;
  color: #fff;
  cursor: pointer;
  margin: 20px 0;
}

.upload:hover {
  background-color: #333;
}

#debug-panel {
  position: fixed;
  right: 5px;
  top: 5px;
  bottom: 5px;
  width: 20%;
  max-width: 400px;
  height: 100vh;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
  color: white;
  padding: 10px;
  border-radius: 10px;
  display: none;
  font-size: 10px;
  font-family: 'Fira Code', Consolas, Monaco, 'Courier New', monospace;
}

#debug-panel h3 {
  margin-bottom: 10px;
  text-align: center;
  color: #f8f9fa;
}

body.error-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-color: #f0f0f0;
  font-family: Arial, sans-serif;
}
.error-page .container {
  text-align: center;
  max-width: 700px;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
}
.error-page .error-message {
  padding: 20px;
  text-align: left;
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  font-family: 'Fira Code', Consolas, Monaco, 'Courier New', monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

#video-container {
  display: none;
  position: fixed;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.7);
  z-index: 9999; /* High z-index to ensure it's on top of everything else */
  border-radius: 10px;
  border-width: 1px;
  border-color: #000;
  margin: 10px; /* Add margin */
  font-size: 10px;
  font-family: 'Fira Code', Consolas, Monaco, 'Courier New', monospace;
  color: #fff;
  width: auto; /* Keep aspect ratio */
}

#video-wrapper {
  margin: 10px;
  position: relative;
  overflow: hidden; 
  height: 20%;
  max-height: 70vh;
  max-width: 35vw;
}

#video {
  width: 100%;
  height: 75vh;
}

#vertical-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  background-color: #000; /* Change this to the color you want for the line */
}

#video-header {
  margin: 5px;
  position: relative;
  width: calc(100% - 10px); /* Subtract the margin */
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box; /* Add this to include padding in width calculation */
}

#scan-information {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

#video-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px;
}

.video-control-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #e0e0e0; /* Light gray color for icons */
  transition: color 0.2s ease;
}

.video-control-btn:hover {
  color: #ffffff; /* White on hover */
}

.control-icon {
  width: 24px;
  height: 24px;
}

#follow-camera-btn {
  position: relative;
  border-radius: 50%;  /* Make button circular */
  padding: 8px;  /* Base padding */
  width: 35px;  /* Fixed width */
  height: 35px; /* Match width for perfect circle */
  display: flex;
  align-items: center;
  justify-content: center;
}

#follow-camera-btn.active {
  background-color: white;
  padding: 2px;  /* Reduced padding for tighter circle */
}

#follow-camera-btn .control-icon {
  width: 24px;  /* Fixed icon size */
  height: 24px; /* Fixed icon size */
}

#follow-camera-btn.active .control-icon {
  color: rgba(0,0,0,0.7);  /* Green color when active */
}

#follow-camera-btn.active .control-icon circle:first-of-type {
  fill: white;
}

.hidden {
  display: none;
}

.playback-speed-container {
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 1000;
}

#speed-multiplier {
  padding: 2px 5px;
  border-radius: 3px;
  background-color: #000;
  color: #fff;
  border: 1px solid #fff;
  font-size: 12px;
  cursor: pointer;
  outline: none;
  position: relative;
  z-index: 1000;
}

#speed-multiplier option {
  background-color: #1E4357;
  color: #fff;
  padding: 5px;
}

#speed-multiplier:hover {
  background-color: #333;
}

#elevation-canvas {
  position: relative; /* or relative, depending on your layout */
  bottom: 10px;
  margin: 10px;
  width: calc(100% - 20px); /* Subtract left and right margins */
  height: 100px; /* Adjust as needed */
}

.modal {
  display: none; /* This hides the modal initially */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.loader {
  border: 16px solid #f3f3f3;
  border-radius: 50%;
  border-top: 16px solid #3498db;
  width: 120px;
  height: 120px;

  -webkit-animation: spin 2s linear infinite;
  animation: spin 2s linear infinite;
}

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

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

.checkmark {
  height: 75px; 
  width: 21px; 
  border-bottom: 10px solid green; 
  border-right: 10px solid green; 
  transform: rotate(45deg); 
  margin: 20px; 
  -webkit-animation: pulsate 2s infinite; /* Applies the pulsating animation */
  animation: pulsate 2s infinite; /* Applies the pulsating animation */
}

@-webkit-keyframes pulsate {
  0% {
    transform: scale(1) rotate(45deg);
  }
  50% {
    transform: scale(1.1) rotate(45deg);
  }
  100% {
    transform: scale(1) rotate(45deg);
  }
}

@keyframes pulsate {
  0% {
    transform: scale(1) rotate(45deg);
  }
  50% {
    transform: scale(1.1) rotate(45deg);
  }
  100% {
    transform: scale(1) rotate(45deg);
  }
}

/* Keyboard Shortcuts Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

.modal-container {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  max-height: 80vh;
  width: 600px;
  overflow: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 1;
}

.modal-header h2 {
  margin-top: 0;
  margin-bottom: 0;
}

.modal-close-btn {
  cursor: pointer;
  border: none;
  background: none;
  font-size: 24px;
  font-weight: bold;
  padding: 0 5px;
  line-height: 1;
}

.modal-content {
  overflow-y: scroll;
  max-height: calc(80vh - 80px);
  padding-right: 10px;
}

#shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 10px;
}

#shortcuts-grid > div {
  grid-column: 1 / span 2;
  margin-top: 15px;
}

#shortcuts-grid h3 {
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
  margin-bottom: 10px;
}

.shortcut-item {
  margin: 5px 0;
}

.shortcut-key {
  display: inline-block;
  padding: 2px 8px;
  background-color: #f0f0f0;
  border-radius: 3px;
  margin-right: 10px;
  font-family: monospace;
  font-weight: bold;
}

/* Custom scrollbar */
.modal-container::-webkit-scrollbar,
.modal-container div::-webkit-scrollbar {
  width: 10px;
}

.modal-container::-webkit-scrollbar-track,
.modal-container div::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 5px;
}

.modal-container::-webkit-scrollbar-thumb,
.modal-container div::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

.modal-container::-webkit-scrollbar-thumb:hover,
.modal-container div::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* EULA Dialog */
#eula-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  visibility: hidden;
  z-index: 1001;
}

#eula-dialog .modal-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 550px;
  height: auto;
  background-color: #1E4357;
  border-radius: 20px;
  border: 2px solid #fff;
  padding: 20px;
  color: #fff;
  font-size: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-direction: column;
}

#eula-dialog .modal-header {
  background-color: #1E4357;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 15px;
}

#eula-dialog .modal-header h2 {
  color: #fff;
  margin-top: 0;
}

#eula-dialog .modal-close-btn {
  color: #fff;
}

#eula-dialog .modal-content {
  overflow-y: auto;
  color: #fff;
  max-height: 50vh;
  width: 100%;
  padding: 0 15px;
  box-sizing: border-box;
}

#eula-dialog .modal-content p {
  margin-bottom: 5px;
}

#eula-dialog .modal-content a {
  color: #8cc8ff;
  text-decoration: underline;
  display: inline-block;
  margin-bottom: 10px;
}

.eula-checkbox-container {
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
}

.eula-actions {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 10px 0 0;
  margin-top: 10px;
}

#accept-eula-btn {
  width: 50%;
  margin: 0 auto;
}

#eula-checkbox {
  width: 18px;
  height: 18px;
}

#blur-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.3); /* Semi-transparent black */
  backdrop-filter: blur(5px); /* Adjust blur amount as needed */
  -webkit-backdrop-filter: blur(5px); /* For Safari */
  /* z-index: -1; /* Behind the canvas */
  display: none; /* Hidden by default */
  pointer-events: none; /* Allow clicks to pass through */
}

