html, body { 
        margin: 0;
        padding: 0;
        height: 100%;
        overflow: hidden; 
    }
    body { 
        font-family: sans-serif; 
        font-size: 1rem;
        background: #111; /* dark background */
    }
    #compositeCanvas {
        position: fixed; top: 0; left: 0;
        width: 100%; height: 100%; background: #000;
        z-index: -1;
    }
    #logo {
        position: static;
        width: 300px;
        padding: 15px 15px 0 15px;
        text-align: center;
        z-index: 1;
    }

    #logo img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    #controls {
        position: static;
        left: 20px;
        width: 300px;
        background: rgba(0, 0, 0, 0.5);
        padding: 15px;
        color: #fff;
        box-shadow: 0 4px 24px rgba(0,0,0,0.5);
        border-radius: 8px;
    }
    #controls h1 { margin: 0 0 10px; font-size: 1.2rem; color: #fff; display: none; }
    #controls .note { font-size: 0.9rem; margin-bottom: 10px; color: #bbb; }
    #controls label { display: block; margin-top: 10px; font-size: 0.95rem; color: #aad; }
    #controls input[type="range"] {
        width: 32px; margin-top: 5px;
        background: #222;
        color: #eee;
        border: 1px solid #444;
        border-radius: 4px;
        padding: 6px 0;
    }
    #controls input[type="range"] {
        accent-color: #0000ff;
        background: linear-gradient(90deg, #222 0%, #444 100%);
        height: 4px;
    }
    #controls input[type="range"]:focus {
        outline: none;
    }
    #controls input[type="range"]:hover,
#controls input[type="range"]:active {
    accent-color: #00ffff;
    background: linear-gradient(90deg, #333 0%, #00ff00 100%);
    border: 1px solid #00ffff;
}

#controls label {
    color: #fff;
}    

#controls #masterSlider {
    width: 100% !important;
}

.warning { font-size: 0.8rem; color: #ff5555; margin-top: 10px; }

.stream-control {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-bottom: 10px;
}

.stream-control input[type="range"] {
    flex: 1;
}
.controls-row {
    display: flex;
    align-items: center;
    gap: 6px;
}


.btn-style, #controls button, .accordion-toggle {
  text-align: left; /* Testo allineato a sinistra per tutti i bottoni */
}

.btn-style, #controls button {
  font-size: 1rem;
  display: block;
  padding: 6px 10px;
  margin-top: 15px;
  background: #222;
  color: #eee;
  cursor: pointer;
  border: 1px solid #444;
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  box-sizing: border-box; /* Assicura che padding e border siano inclusi nella larghezza totale */
}

.btn-style:hover, #controls button:hover {
  background: #0000ff;
}

#unlockBtn {
  width: 100%;
}

.mute-btn, .solo-btn {
    width: auto;
    margin-left: 2px;
    margin-top: 10px !important;
    padding: 2px 8px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #444;
    background: #222;
    color: #eee;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.solo-btn.active, .mute-btn.active {
    background: #00ff00 !important;
    color: #000 !important;
    border-color: #00ff00 !important;
}

/* Stili Accordion */
.accordion {
  margin-top: 15px;
  width: 100%;
}

.accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  padding-left: 10px;
  padding-right: 10px;
  background: #222;
  color: #eee;
  border: 1px solid #444;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  box-sizing: border-box;
}

.accordion-toggle span:first-child {
  flex-grow: 1; /* Spinge lo chevron a destra */
  text-align: left;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  background: rgba(20, 20, 20, 0.5);
  border-radius: 0 0 4px 4px;
  padding: 0 10px;
}

.accordion-content.open {
  padding: 15px 10px;
}

.chevron {
  margin-left: 10px;
  border: solid #eee;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  transition: transform 0.3s ease-out;
  /* Centrato verticalmente grazie a flex */
}

.accordion-toggle.active .chevron {
  transform: rotate(-135deg);
  -webkit-transform: rotate(-135deg);
}
