:root {
  --base-color: #2b2b2a;
  --background-color: #ffffff;
  --text-color: #000000;
  --box-color: #ffffff;
  --link-color: blue;
  --component-color: #ecebeb;
  }

main {
  display: flex;
  flex: 1;
  flex-direction: column;
  background-color: var(--background-color);
  transition: background-color, color;
}

/* General page styles  */
html,body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  overflow-x: hidden;
  overflow-y: auto;
}

/* links */
a {
  color: var(--link-color);
}
a:hover {
  transition: color 0.5s ease;
  color: red;
}

p {
  text-align: center;
  font-size: 18px;
}

/* Darkmode */
body.dark-mode {
  --background-color: #4b4b4b;
  --text-color: #ffffff;
  --box-color: rgb(39, 39, 39);
  --link-color: #9ecfff;
  --base-color: #1a1a1a;
  --component-color: #363636;
}

.dark-mode .dark-button img {
  filter: invert(1);
}

  /* Styling the header */
header {
  height: 38px;
  background-color: var(--base-color);
  text-align: center;
  align-items: center;
  filter: drop-shadow(0px 0px 5px var(--base-color));
}

/* Xenotools logo */
.logo {
  position: absolute;
  top: 5px;
  left: 70px;
  filter: drop-shadow(0px 0px 6px var(--base-color));
}

.logo img {
  height: 60px;
  width: 60px;
  transition:filter 0.5s ease;
}

.logo img:hover {
  filter: brightness(150%);
}

.logo img:active {
  transform: scale(95%);
  filter: brightness(60%);
}
  
/* standard text styles */
h1, h2, h3 {
  text-align: center;
  margin-bottom: -10px;
}

p {
  text-align: left;
}
  
/* Page forms */
form, #xeno-panel {
  justify-content: center;
  max-width: 95%;
  min-width: 600px;
  width: 30%;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--background-color);
  border: 1px solid #ddd;
  border-radius: 20px;
  transition: background-color, color;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  justify-content: center;
}

#xeno-panel2 {
  justify-content: center;
  max-width: 95%;
  min-width: 600px;
  width: 50%;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--background-color);
  border: 1px solid #ddd;
  border-radius: 20px;
  transition: background-color, color;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  justify-content: center;
}

#xeno-panel-index {
  justify-content: center;
  max-width: 90%;
  width: 90%;
  margin: 0 auto;
  margin-top: 2rem;
  padding: 1px;
  background-color: var(--background-color);
  border: none;
  border-radius: 50px;
  transition: background-color, color;
  box-shadow: none;
}

/*input devices*/
label {
  display: block;
  margin-bottom: 0.5rem;
  font-style: bold;
}
  
input {
  width: 60%;
  padding: 0.5rem;
  margin-bottom: 6px;
  border: 1px solid #ccc;
  border-radius: 25px;
}
  
#result {
  text-align: center;
  font-size: 1.2rem;
}

/* Button styles*/
button {
  padding: 0.5rem 1rem;
  color: #fff;
  border: none;
  cursor: pointer;
}

.unit-btn {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  background-color: var(--base-color);
  color: white;
  border-radius: 20px;
  transition: background-color 0.3s ease;
  filter: drop-shadow(0px 0px 1px var(--base-color));
  font-weight: bold;
}

.unit-btn:hover{
  background-color: #3f3f3f;
  color: white;
  filter: drop-shadow(0px 0px 2px var(--base-color));
}

.unit-btn:active {
  background-color: #aa0000;
  transform: scale(0.95);
}

.toggle-btn {
  background-color: var(--base-color);
  border-radius: 40px;
  transition: background-color 0.3s ease;
  text-align: center;
}

.toggle-btn:hover{
  background-color: #3f3f3f;
  filter: drop-shadow(0px 0px 2px var(--base-color));
}

.toggle-btn:active {
  background-color: #aa0000;
  transform: scale(0.95);
}

.selected {
  background-color: #aa0000;
  color: #ffffff;
  font-weight: 800;
}

a.btn {
  text-decoration: none;
  font-family: 'Arial', sans-serif;
  font-size: 16px;
  color: --text-color;
}

a.btn:hover {
    font-weight: bold;
}
  
/* Footer styling */
footer {
  background-color: var(--base-color);
  color: white;
  padding: 1px 1px;
  text-align: center;
  filter: drop-shadow(0px 0px 5px var(--base-color));
}

footer nav ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

footer nav ul li {
  display: inline-block;
  margin: 0 3%;
}

footer nav ul li a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

footer nav ul li a:hover {
  color: #ffcc00;
}

footer p {
  margin: -30px;
  padding: 5px;
  font-size: 0.9em;
}

/* Category box styles Homescreen */
.category-container {
  float: left;
  padding: 5px;
}

.category-box {
  background-color: var(--box-color);
  width: 200px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  text-align: center;
  transition: background-color, color;
  justify-content: center;
}
  
.category-box .btn {
  display: block;
  margin: 5px 0;
  color: var(--text-color);
  font-family: 'Arial', sans-serif;
  font-size: 16px;
  padding: 2px;
  transition: color;
}

.category-box:hover {
  transition: scale 1s, box-shadow 1s;
  scale: 98%;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.category-box .btn:active {
  transform: scale(0.95);
}


/*darkmode toggle button*/
.dark-button {
  margin-right: 50px;
  background: none;
  cursor: pointer;
  margin-left: auto;
  display: block;
  filter: drop-shadow(0px 0px 6px var(--base-color));
}

.dark-button img {
  width: 50px;
  height: 50px;
  transition: filter 1s ease-in-out;
}

.dark-button img:hover {
  filter: brightness(40%);
}

.dark-button img:active {
  transform: scale(90%);
}

.dark-mode .dark-button img:hover {
  filter: invert(1) brightness(200%);
  transition: filter 1s ease-in-out;
}

/* Slider styles */
.slider-container {
  width: 100%;
}

.slider-with-labels {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.slider {
  flex-grow: 1;
  height: 8px;
  background: var(--component-color);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--text-color);
  cursor: pointer;
  transition: background 0.2s;
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.slider::-webkit-slider-thumb:hover {
  background: #aa0000;
}

.slider-min, .slider-max {
  font-size: 25px;
  margin-top: -10px;
  color: var(--text-color);
  width: 20px;
  text-align: center;
}

#length-value {
  font-weight: bold;
  color: var(--text-color);
}





/* Mobile mode */
@media screen and (max-width: 600px) {
  #xeno-panel-index {
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
  }

  /* Page forms */
form, #xeno-panel, #xeno-panel2 {
  justify-content: center;
  max-width: 90%;
  min-width: 0px;
  width: 80%;
}

  input {
    width: 92%;
  }

  .category-container {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
  }

  .category-box {
    float: none;
    width: 83%;
  }
}