:root {
  --theme-default-color: #ff0000;
  --theme-arc-normal: #ad946f;
  --theme-point-normal: #ad946f;
  --theme-sphere: #2d253c;
  --theme-label-color: #ffffff;
  --theme-text-stroke: #000000;
  --theme-slider-text: #ad946f;
  --theme-slider-background: #2d253c;
  --theme-background: #17131f;
}

[data-theme="light"] {
  --theme-arc-normal: #7b6148;
  --theme-point-normal: #7b6148;
  --theme-sphere: #fbe6c3;
  --theme-label-color: #000000;
  --theme-text-stroke: #ffffff;
  --theme-slider-text: #7b6148; 
  --theme-slider-background: #fbe6c3;
  --theme-background: #fcfaf4;
}

[data-theme="dark"] {
  --theme-arc-normal: #ad946f;
  --theme-point-normal: #ad946f;
  --theme-sphere: #2d253c;
  --theme-label-color: #ffffff;
  --theme-text-stroke: #000000;
  --theme-slider-text: #ad946f;
  --theme-slider-background: #2d253c;
  --theme-background: #17131f;
}


.model-label {
  color: var(--theme-label-color);
  font-size: 0.7em;
  text-shadow: 
    2px 0 var(--theme-text-stroke), 
    -2px 0 var(--theme-text-stroke), 
    0 2px var(--theme-text-stroke), 
    0 -2px var(--theme-text-stroke),
    1px 1px var(--theme-text-stroke), 
    -1px -1px var(--theme-text-stroke), 
    1px -1px var(--theme-text-stroke), 
    -1px 1px var(--theme-text-stroke);
}

.model-gui {
   width: 100%;
   height: 100%;
   top: 0px;
   overflow: hidden;
   position: absolute;
   pointer-events: none;
  z-index: 999;
}

.gui-sliders {
  display: flex;
  flex-direction: column;
  position: absolute;
  width: 25%;
  color: var(--theme-slider-text);
  height: fit-content;
  font-weight: bold;
  top: 60px;
  right: 10px;
  padding: 5px;
  background-color: var(--theme-slider-background);
  border: 2px solid var(--theme-slider-text);
  border-radius: 10px;
  min-width: 15rem;
}

.gui-hidden {
  display: none;
}

.gui-ctrlbtn {
  pointer-events: all;
  width: 40px;
  height: 40px;
  background-color: var(--theme-slider-background);
  border: 2px solid var(--theme-slider-text);
  border-radius: 10px;
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  align-content: center;
}

.gui-slider-icon {
    width: 70%;
    height: 70%;
    margin: auto;

    background-color: var(--theme-slider-text);

    mask: url("./assets/sliders.svg") center / contain no-repeat;
    -webkit-mask: url("./assets/sliders.svg") center / contain no-repeat;
}

.page-controls {
  position:absolute;
  width: fit-content;
  height: fit-content;
  top: 0;
  left: 0;
  right: 0;
  margin: auto;
  background-color: var(--theme-slider-background);
  border-left: 2px solid var(--theme-slider-text);
  border-right: 2px solid var(--theme-slider-text);
  border-bottom: 2px solid var(--theme-slider-text);
  border-radius: 0 0 10px 10px;
  padding: 10px;
  pointer-events: all;
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.slidecontainer {
  box-sizing: border-box;
  width: 100%;
  padding: 5px;
  pointer-events: all;
  user-select: none;

  p {
    color: var(--theme-slider-text); 
    padding: 0;
    margin: 0;
    margin-left: 10px;
    font-size: 0.8em;
  }
}

.slider {
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  width: 100%; 
  height: 20px;
  border-radius: 20px; 
  background: var(--theme-slider-background);
  border: 2px solid var(--theme-slider-text);
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  margin: 0px;
   width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  background-color: var(--theme-slider-text);
  outline: none;
  border: none;
}

.slider-range {
  display: flex; 
  flex-direction: row;
  justify-content: space-between;
  margin-top: -5px;

  p {
    margin: 0;
  }

}



.gui-textarea {
  display: flex;
  position: absolute;
  max-width: 30%;
  color: var(--theme-slider-text);
  height: 100%;
  font-weight: bold;
  top: 15%;
  left: 50px;
}

.arrows-container {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5%;
  margin: auto;
  width: fit-content;
  display: flex;
  gap: 20px;
  padding: 5px;
}

.arrow {
  padding: 10px;
  background-color: var(--theme-slider-background);
  width: 20px;
  height: 20px;
  border-radius: 100%;
  user-select: none;
  cursor: pointer;
  pointer-events: all;
  color: var(--theme-slider-text);
  border: 2px solid var(--theme-slider-text);
}

.arrow:hover {
  background-color: #ffd57244;
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: "▼";
  font-size: 0.8rem;
  top: 4px;
  right: 10px;
  position: absolute;
  color: var(--theme-slider-text);
}

.model-dropdown {
  appearance: none;
  width: 200px;
  overflow: hidden;
  background-color: var(--theme-background);
  border-radius: 10px;
  border: 2px solid var(--theme-slider-text);
  color: var(--theme-slider-text);
  padding: 3px; 
  padding-left: 10px;
  outline: none;
  cursor: pointer;
}

/* Theme Toggle */

.theme-toggle-wrap {
  position: relative;
  display: inline-block;
}

.theme-toggle-input {
  opacity: 0;
  position: absolute;
  pointer-events: none;

 }

.theme-toggle {
  background-color: var(--theme-background);
  border: 2px solid var(--theme-slider-text);
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: relative;
  height: 26px;
  width: 50px;
  cursor: pointer;
  user-select: none;
}

.theme-toggle-thumb {
  background-color: var(--theme-slider-text);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  height: 22px;
  width: 22px;
  transform: translateX(0px);
  transition: transform 0.2s linear;
}

.theme-toggle-input:checked + .theme-toggle .theme-toggle-thumb {
  transform: translateX(24px); 
}

.toggle {
  padding: 5px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  user-select: none;
  pointer-events: all;
  --toggle-height: 1.5rem;
  --toggle-width: calc(var(--toggle-height) * 2);
  --toggle-padding: 2px;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-switch {
  flex-shrink: 0;
  background-color: var(--theme-slider-background);
  border: var(--toggle-padding) solid var(--theme-slider-text);
  border-radius: var(--toggle-height);
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: relative;
  height: var(--toggle-height);
  width: var(--toggle-width);
  cursor: pointer;
  user-select: none;
}

.toggle-switch::before {
  content: "";
  box-sizing: border-box;
  border: 2px solid var(--theme-slider-text);
  background-color: var(--theme-slider-background);
  border-radius: 50%;
  position: absolute;
  top: var(--toggle-padding);
  left: var(--toggle-padding);
  height: calc(var(--toggle-height) - 2 * var(--toggle-padding));
  width: calc(var(--toggle-height) - 2 * var(--toggle-padding));
  transform: translateX(0px);
  transition: transform 0.1s linear, background-color 0.1s linear;
}

.toggle input:checked + .toggle-switch::before {
  background-color: var(--theme-slider-text);
  transform: translateX(calc(var(--toggle-width) - var(--toggle-height))); 
}

.theme-icon {
  pointer-events: none;
  z-index: 2;
}

.sun {
  color: #f4a300; 
}

.moon {
  transform: translateY(-1px);
  color: #af7500; 
}

