body {
  margin: 0;
  overflow: hidden;
  font-family: sans-serif;
}
canvas {
  display: block;
}

/* Login Overlay Styles */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loginContainer {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  padding: 30px;
  width: 90%;
  max-width: 400px;
  text-align: center;
}

.login-logo {
  width: 120px;
  margin-bottom: 20px;
}

.auth-form {
  text-align: left;
}

.auth-form h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.input-group {
  margin-bottom: 15px;
}

.input-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  color: #555;
}

.input-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  box-sizing: border-box;
}

.form-error {
  color: #d9534f;
  font-size: 14px;
  margin-bottom: 15px;
  min-height: 20px;
}

.form-info {
  background-color: #f8f9fa;
  padding: 10px;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 15px;
  color: #555;
}

.form-info.highlight {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.primary-button {
  width: 100%;
  padding: 12px;
  background-color: #0066aa;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.primary-button:hover {
  background-color: #005599;
}

.auth-links {
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
}

.auth-links a {
  color: #0066aa;
  text-decoration: none;
  margin: 0 10px;
}

.auth-links a:hover {
  text-decoration: underline;
}

.hidden {
  display: none;
}

/* --- NEW LOGO STYLE --- */
#pageLogo {
  position: absolute; /* Position relative to the nearest positioned ancestor (or the body) */
  top: 10px;      /* Distance from the top edge */
  right: 10px;     /* Distance from the right edge */
  width: 100px;     /* Fixed width */
  height: 97px;    /* Fixed height */
  z-index: 12;      /* Ensure it's above most other elements (like controls/VR button) */
}
/* --- END NEW LOGO STYLE --- */

#vr_button {
  position: absolute;
  bottom: 20px;
  right: 280px; /* Adjusted to not overlap with transform UI */
  z-index: 11;
}

/* Transform UI Styles */
.transformContainer {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 240px;
  background-color: rgba(40, 40, 40, 0.85);
  color: white;
  border-radius: 5px;
  padding: 10px;
  font-family: sans-serif;
  font-size: 14px;
  z-index: 10;
  display: none; /* Hidden by default, shown when object selected */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.transformHeader {
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 16px;
  color: #33ccff;
  border-bottom: 1px solid #666;
  padding-bottom: 5px;
}

.transformModeSelector {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.transformModeSelector select {
  width: 120px;
  background-color: #444;
  color: white;
  border: 1px solid #666;
  padding: 3px;
  border-radius: 3px;
}

.transformSection {
  margin-bottom: 10px;
  padding: 5px;
  background-color: rgba(60, 60, 60, 0.5);
  border-radius: 4px;
}

.sectionHeader {
  font-weight: bold;
  margin-bottom: 5px;
  color: #ffcc33;
  font-size: 13px;
}

.transformRow {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  align-items: center;
}

.transformRow label {
  flex: 0 0 20px;
  color: #ccc;
}

.transformRow input {
  flex: 1;
  background-color: #333;
  color: #fff;
  border: 1px solid #666;
  padding: 3px 5px;
  border-radius: 3px;
  width: 70px;
}

#deleteSelectedAssetButton {
  background-color: #ffaaaa;  /* Light red background */
}

#deleteSelectedAssetButton:hover {
  background-color: #ff8888;  /* Darker red on hover */
}
.controlsContainer {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 10px;
  border-radius: 5px;
  z-index: 10;
  width: 210px;
  max-height: 90vh;
  overflow-y: auto;
}

/* User controls section */
.user-controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ccc;
}

.logout-button {
  background-color: #f8f9fa;
  border: 1px solid #ccc;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  display: inline-block;
  width: auto;
  margin: 0;
  box-sizing: border-box;
}

.logout-button:hover {
  background-color: #e9ecef;
}

.admin-link {
  background-color: #007bff;
  color: white;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  display: none; /* Hidden by default, shown only to admin */
  width: auto;
  margin: 0;
  box-sizing: border-box;
}

.admin-link:hover {
  background-color: #0069d9;
}

.user-display {
  font-size: 13px;
  color: #333;
  margin: 0 10px;
  padding: 6px 0;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75px;
}
.controlsContainer button:not(.logout-button) {
  display: block;
  margin-bottom: 5px;
  padding: 8px;
  background-color: #eee;
  border: 1px solid #ccc;
  cursor: pointer;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}
.controlsContainer input[type="file"],
.controlsContainer input[type="text"],
.controlsContainer select {
  display: block;
  width: 100%;
  margin-bottom: 5px;
  padding: 4px;
  box-sizing: border-box;
}
.controlsContainer input[type="file"] {
  display: none;
}
  .controlsContainer label {
  font-size: 0.9em;
  display: block;
  margin-bottom: 2px;
}
#currentSceneInfo {
  margin-bottom: 10px;
  padding: 5px;
  background-color: rgba(0, 150, 200, 0.2);
  color: #333;
  font-size: 0.9em;
  border-radius: 3px;
  border: 1px solid #ccc;
}

#currentSceneName {
  font-weight: bold;
  color: #0066aa;
}

#info {
  margin-top: 10px;
  padding: 5px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 0.9em;
  border-radius: 3px;
}
#coords {
    margin-top: 5px;
    padding: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-family: monospace;
    font-size: 0.9em;
    border-radius: 3px;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.3;
}
#coords .label { color: #aaa; }
#coords .value { color: #0f0; font-weight: bold; }
hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 10px 0;
}
  hr.minor { /* Optional: thinner separator */
    border-top: 1px dotted #ccc;
    margin: 8px 0;
  }
#load-status {
    font-size: 0.8em;
    color: #1155cc;
    margin-top: 5px;
    min-height: 3em;
    font-weight: bold;
    word-wrap: break-word;
    border: 1px dashed #ccc;
    padding: 4px;
    display: none;
}
#load-status.error { color: #cc3311; border-color: #cc3311; }
#load-status.success { color: #228833; border-color: #228833; }
#load-status.warning { color: #cc7700; border-color: #cc7700; }

#animationControls {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #aaa;
    display: none;
}
#animationControls label {
    font-weight: bold;
    margin-bottom: 4px;
}
  .controlsContainer label.inline { /* Optional: for side-by-side label/select */
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
  }
  .controlsContainer select.inline { /* Optional */
    display: inline-block;
    width: calc(100% - 85px); /* Adjust width as needed */
  }
    .controlsContainer input.inline { /* Optional */
    display: inline-block;
    /* width: calc(100% - 60px); */ /* Adjust if needed */
  }
  .controlsContainer button.inline { /* Optional */
    display: inline-block;
    width: auto; /* Adjust width */
    padding: 4px 8px; /* Smaller padding */
    margin-left: 5px;
  }
  
  #loadSelectedSceneButton {
    background-color: #0066aa;
    color: white;
  }
  
  #loadSelectedSceneButton:hover {
    background-color: #005599;
  }