body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0e0e0e;
    color: #ffffff;
    overflow: hidden;
}

/* HERO BASE */
.hero {
    min-height: 100vh;
    display: flex;
    position: relative;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    z-index: 999;
}

/* CONTENITORE SFONDI */
.bg-wrap {
    position: fixed;
    inset: 0;
    z-index: 1;
}

/* SFONDI */
.bg {
    position: absolute;
    inset: 0;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    opacity: 0;
    animation: bgFade 18s infinite;
}

/* IMMAGINI */
.bg1 {
    background-image:
        linear-gradient(rgba(0,0,0,.65), rgba(0,0,0,.85)),
        url('/img/hero1.jpg');
    animation-delay: 0s;
}

.bg2 {
    background-image:
        linear-gradient(rgba(0,0,0,.65), rgba(0,0,0,.85)),
        url('/img/hero2.jpg');
    animation-delay: 6s;
}

.bg3 {
    background-image:
        linear-gradient(rgba(0,0,0,.65), rgba(0,0,0,.85)),
        url('/img/hero3.jpg');
    animation-delay: 12s;
}

/* CONTENUTO SOPRA */
.hero-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

/* CTA */
.cta {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.9rem 2rem;
    background: #1db954;
    color: #000;
    font-weight: bold;
    border-radius: 999px;
    text-decoration: none;
}

/* ANIMAZIONE CORRETTA */
@keyframes bgFade {
    0%   { opacity: 0; }
    10%  { opacity: 1; }
    30%  { opacity: 1; }
    40%  { opacity: 0; }
    100% { opacity: 0; }
}

.hero h1 {
    font-size: 3rem;
    margin: 1rem;
}

.hero .subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    opacity: 0.85;
    bottom: 1rem;
}

.hero .cta {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: #1db954;
    color: #000;
    font-weight: bold;
    text-decoration: none;
    border-radius: 999px;
    margin: 1rem;
    cursor: pointer;
}

.track-card {
  display: flex;
  align-items: anchor-center;
  justify-content: center;
  gap: 20px;
  background: transparent;
  border-radius: 12px;
  padding: 16px;
  margin: 10px auto;
  border: 1px solid #222;
  max-width: 70%;
  box-shadow: 0 0 10px #000;
  min-width: 474px;
}
/* Cover a destra */
.track-cover {
  width: 128px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
}
.preview{
  display: flex;
  max-height: fit-content;
}
/* Corpo a sinistra: titolo, eq, pulsanti */
.track-body {
  flex: 1;
  /* min-width: 0px; */
  color: #eaeaea;
}

/* Titolo brano */
.track-title {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 600;
  height: 2.5em;
  text-align: justify;
}
.allcontrol{
  display: flex;
  gap: 14px;
}
/* === Equalizzatore bande gialle === */
.eq-line{
  width: 200px;
  height: 52px;
  position: relative;
  /* transform: translateX(-200px); */
  background: transparent;
}
.eq {
  display: flex;
  gap: 6px;
  height: 40px;
  margin: 6px 0 6px 0;
  opacity: .35;
  transition: opacity .2s;
  width: 200px;
  align-items: flex-end;
  flex-direction: row;
}
.eq.playing {opacity: 1;}

.eq span {
  min-width: 4px;
  background: #6a0dad9c;
  border-radius: 2px;
  height: 4px;
  animation: none;
}

.eq.playing span {
    /* Assicurati che le barre abbiano un'altezza e una larghezza fisse */
    width: 4px; /* O la larghezza che preferisci */
    display: inline-block;
    background-color: #6a0dad9c; /* Il tuo colore di accento */
    margin: 0 1px;
    /* ✅ AGGIUNGI QUESTA TRANSITION: Rende il cambio di altezza graduale (0.5s) */
    transition: height 0.5s ease-out; 
    /* Altezza minima di base per la visualizzazione */
    height: 4px;
}

.controls {
  display: flex;
  flex-wrap: wrap;         /* così non vengono tagliati se superano la larghezza */
  gap: 30px;
  align-items: center;
  margin-top: 10px;
  width: 41%;
}

/* === BOTTONI GENERICI === */
.controls button,
.controls a {
  min-height: 36px;        /* altezza fissa */
  line-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #3a3a3a;
  background: #2a2a2a;
  color: #ddd;
  text-decoration: none;
  transition: background .2s, transform .1s;
  display: flex;
  justify-content: center;
  align-items: anchor-center;
}

/* hover comune */
.controls button:hover,
.controls a:hover {
  background: #333;
  transform: scale(1.03);
}

/* === PULSANTI PLAYER (Stop / Play / Pause) === */
.controls .btn-stop {
    background: transparent;
    color: #fff;
    border: 2px solid #3a3a3a;
    width: 36px;
    height: 36px;
    padding: 0px;
    border-radius: 50%;
}
.controls .btn-play {
    background: transparent;
    color: #fff;
    border: 2px solid #3a3a3a;
    width: 36px;
    height: 36px;
    padding: 0px;
    border-radius: 50%;
}
.svgbtn{
  width:20px;
  height:20px;
  fill: #fff;
  pointer-events: none;
  stroke-width: 4px;
  stroke: currentColor;
  margin: auto;
}
.controls .btn-pause {
  background: transparent;
  color: #fff;
  border: 2px solid #3a3a3a;
  width: 36px;
  height: 36px;
  padding: 0px;
  border-radius: 50%;
}

.audiorange{
  width:200px;
  padding:0px;
  margin:0px;
  /* left: 0px !important; */
  position: relative;
}
/*   slide range */

input[type=range] {
  margin: 0 100% 0 0;
  -moz-appearance: none;
  appearance: none;
  width: 200px;
  height: 2px;
  background: #22cf31;
  border-radius: 2px;
  padding: 0;
  outline: none;
  color: #22cf31;
}
input[type=range]:focus {
  outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px;
  cursor: pointer;
  background: #32e443;
}
input[type=range]::-webkit-slider-thumb {
  height: 8px;
  width: 3px;
  border-radius: 0px;
  background: #ffffff;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -3px;
}
input[type=range]:focus::-webkit-slider-runnable-track {
  background: #367ebd;
}
input[type=range]::-moz-range-track {
  width: 100%;
  height: 2px;
  cursor: pointer;
}
input[type=range]::-moz-range-thumb {
  height: 8px;
  width: 3px;
  border-radius: 0px;
  background: #ffffff;
  cursor: pointer;
}
input[type=range]::-ms-track {
  width: 100%;
  height: 3px;
  cursor: pointer;
  background: transparent;
  border-color: transparent;
  border-width: 16px 0;
  color: transparent;
}
input[type=range]::-ms-fill-lower {
  background: #2a6495;
}
input[type=range]::-ms-fill-upper {
  background: #3071a9;
}
input[type=range]::-ms-thumb {
  height: 8px;
  width: 3px;
  border-radius: 0px;
  background: #ffffff;
  cursor: pointer;
}
input[type=range]:focus::-ms-fill-lower {
  background: #3071a9;
}
input[type=range]:focus::-ms-fill-upper {
  background: #367ebd;
}
.red{
  color: red !important;
}
.white{
  color: white !important;
}
.green{
  color: green !important;
  border-color: green !important;
}
@media (orientation: portrait) {

  body {
    overflow-y: auto;
  }
.hero h1 {
    font-size: 2rem;
    margin: 1rem;
}
  .hero,
  .hero-content {
    padding: 0.4rem;
    min-height: 100svh;
  }
  .preview{
    flex-direction: column;
    width: 100%;
  }
  .track-card {
    flex-direction: column;
    align-items: stretch;
    max-width: 100%;
    min-width: 0;              /* 🔴 FONDAMENTALE */
    padding: 12px;
    margin: 2px 0;
  }

  .track-cover {
    width: 96px;
    margin: 0 auto 10px auto;
  }

  .track-title {
    text-align: center;
    font-size: 16px;
  }

  .eq {
    justify-content: center;
  }
  .allcontrol{
    display: flex;
    gap: 40px;
    flex-direction: column;
  }

  .controls {
    width: 100%;
    justify-content: center;
    gap: 20px;
  }

  .audiorange,
  input[type=range] {
    width: 100%;
    margin: 8px 0 0 0;
  }
}