html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: Helvetica, Arial, sans-serif;
  background: black;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px;
}

.titolo-container {
  width: 80%;
}

.titolo-container h1 {
  margin: 0;
  color: white;
  font-weight: bold;
  font-size: 20px;
  text-align: justify;
  text-align-last: justify;
  hyphens: auto;
  word-break: break-word;
}

button.freccia-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  height: 1.5em;
  aspect-ratio: 1 / 1;
}

button.freccia-link img {
  height: 100%;
  filter: invert(1);
  display: block;
}

/* Header Control Bar */
.controls-bar {
  display: flex;
  justify-content: space-around;
  background: black;
  color: rgb(255, 255, 255);
  font-weight: bold;
  font-family: Helvetica, Arial, sans-serif;
  padding: 8px 0;
  font-size: 14px;
  text-transform: uppercase;
}

.control-button {
  cursor: pointer;
  user-select: none;
}

/* Canvas */
#canvas-container {
  flex: 1;
  position: relative;
}

canvas#patternCanvas {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
}

/* Footer - Slider container */
footer#menu {
  display: flex;
  width: 100%;
  height: 40px;
  background: black;
  font-size: 14px;
}

/* Slider labels */
footer#menu label {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 100%;
  cursor: pointer;
  overflow: hidden;
}

/* Testo slider */
.slider-label {
  position: relative;
  z-index: 3;
  font-weight: bold;
  color: white;
  mix-blend-mode: difference;
  pointer-events: none;
  text-align: center;
  width: 100%;
}

/* Riempimento slider */
.slider-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  z-index: 1;
  pointer-events: none;
}

/* Slider senza track visibile */
footer#menu input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: transparent;
  z-index: 2;
}

footer#menu input[type="range"]::-webkit-slider-runnable-track,
footer#menu input[type="range"]::-moz-range-track {
  background: transparent;
}

footer#menu input[type="range"]::-webkit-slider-thumb,
footer#menu input[type="range"]::-moz-range-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 0;
  background: transparent;
  border: none;
}

/* Disattiva completamente il thumb (pallino) per tutti i browser */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 100%;
  background: transparent;
  border: none;
}

input[type="range"]::-moz-range-thumb {
  width: 0;
  height: 100%;
  background: transparent;
  border: none;
}

input[type="range"]::-ms-thumb {
  width: 0;
  height: 100%;
  background: transparent;
  border: none;
}
