html, body {
  color: #000;
  background: #fff;
  font-family: Arial, sans-serif;
  font-size: 15px;
  overflow: auto;
  height: 100%;
  margin: 0;
  padding: 0;
}

a {
  color: black;
  text-decoration: none;
}

a:visited {
  color: black;
}

a:hover {
  text-decoration: underline;
}

a:active {
  color: black;
}

.jbouterbox {
  margin: 12pt;
  width: calc(100% - 24pt);
  height: calc(100vh - 24pt);
  display: flex;
  flex-direction: column;
  padding: 0;
  position: relative;
}

.header-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.hometitle, .hometitles {
  background: rgba(255, 255, 255, 0.459);
  display: inline-block;
  font-family: Arial, sans-serif;
  letter-spacing: 1px;
}

.hometitle {
  font-size: 17px;
  font-weight: bold;
}

.hometitles {
  font-size: 13px;
  color: rgb(27, 27, 27);
  padding: 0;
}

#jbmodel-container {
  width: 100%;
  height: calc(100% - 80px);
  position: relative;
  overflow: hidden;
}

.model-description {
  font-size: 13px;
  color: #333;
  background: rgba(255, 255, 255, 0.8);
  margin-bottom: 5px;
  display: block;
  line-height: 1.4;
}

.controls-container-group {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#controls-container {
  display: flex;
  flex-direction: column;
  padding: 5px;
  background: #80808070;
  width: auto;
}

#jblegend-container {
  background: rgba(255, 255, 255, 0.9);
  padding: 10px;
  width: auto;
  border: 1px solid grey;
}

.controls-group {
  padding: 0px;
  border-radius: 8px;
  width: 100%;
}

.group-label {
  color: #040404;
  font-size: 12px;
  margin-bottom: 5px;
  text-transform: uppercase;
  opacity: 0.8;
  background-color: #ffffff85;
  display: none;
}

.controls-grid {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}

.controls-row {
  display: flex;
  gap: 2px;
}

.control-section {
  flex: 1;
}

button {
  width: 25px;
  height: 25px;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  border: none;
  justify-content: center;
  flex-shrink: 0;
  margin: 2px;
}

button:hover {
  background: rgba(199, 199, 199, 0.9);
}

button.active {
  background-color: #0078ff;
  color: white;
}

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#loading-progress {
  width: 200px;
  height: 10px;
  background-color: #f0f0f0;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
}

#loading-bar {
  width: 0;
  height: 100%;
  background-color: #005892;
  transition: width 0.5s ease;
}

#loading-message {
  font-size: 12px;
  font-family: arial;
  font-weight: normal;
}

#jblegend {
  list-style: none;
  padding: 0;
  margin: 0;
}

#jblegend li {
  display: flex;
  align-items: center;
  margin: 5px 0;
}

.jbcolor-box {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.jblabel {
  font-size: 12px;
}

.controls-group.bottom-row {
  display: flex;
  justify-content: flex-start;
}

.controls-grid button + button {
  margin-left: 2px;
}

#jblegend-container h3 {
  margin: 0 0 5px 0;
  font-size: 13px;
  color: #333;
}

#jblegend li .jbcolor-box {
  width: 18px;
  height: 18px;
  margin-right: 5px;
}

#jblegend li .jblabel {
  font-size: 13px;
  color: #555;
}

@media (max-width: 430px) {
  .outerbox {
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    margin: 8px;
  }

  .hometitle,
  .hometitles {
    margin: 0 0px 3px 0;
  }

  .homebox {
    margin: 8px;
    gap: 5px;
  }
}
