.audio-wrapper {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px;
}

/* PULSANTE INDIETRO */
.back-btn {
  display: inline-block;
  padding: 6px 0 0;
  margin: 0;
  font-size: 15px;
  color: #AD2B2B;
  text-decoration: none;
  font-weight: 600;
  text-align: left;
  width: 100%;
}

.back-btn:hover {
  text-decoration: underline;
}

/* TITOLO PLAYER */
.player-title {
  margin: 0 0 10px;
  color: #333;
}

.player-title .title-flag {
  display: block;
  width: 22px;
  height: 15px;
  margin: 0 auto 6px;
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.1);
}

/* HEADER PLAYER */
.player-header {
  margin-bottom: 24px;
  padding: 16px;
  background: linear-gradient(135deg, #fdf6f6 0%, #f9ecec 100%);
  border-radius: 12px;
  border: 1px solid #f0d4d4;
}

.player-header span {
  font-size: 17px;
  font-weight: 600;
  color: #333;
  vertical-align: middle;
}

/* BOTTONI LINGUA (pagina principale) */
#buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#buttons .lang-btn {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 20px;
  line-height: 1;
  border-radius: 12px;
  border: none;
  background: #AD2B2B;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(173, 43, 43, 0.3);
}

#buttons .lang-btn:hover {
  background: #961f1f;
  box-shadow: 0 4px 12px rgba(173, 43, 43, 0.4);
}

#buttons .lang-btn:active {
  transform: scale(0.98);
}

#buttons .lang-btn img {
  width: 26px;
  height: 18px;
  vertical-align: middle;
  margin-bottom: 2px;
  margin-right: 10px;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* BOTTONI TRACCE (pagina player) */
#tracks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#tracks button {
  width: 100% !important;
  padding: 16px 16px 16px 20px;
  font-size: 18px;
  line-height: 1.2 !important;
  border-radius: 12px;
  border: none;
  background: #AD2B2B;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  box-shadow: 0 2px 8px rgba(173, 43, 43, 0.3);
}

#tracks button.active {
  background: #7a1e1e !important;
  box-shadow: 0 2px 12px rgba(122, 30, 30, 0.5);
}

#tracks button:active {
  transform: scale(0.98);
}

#tracks button .track-num {
  font-weight: 700;
  opacity: 0.7;
  margin-right: 2px;
}

/* testo traccia in riproduzione */
#currentTrack {
  margin-top: 40px;
  font-weight: bold;
  font-size: 16px;
  color: #AD2B2B;
}

/* player */
#audioPlayer {
  width: 100%;
  margin-top: 0;
  transition: all 0.3s ease;
}

.hidden-player {
  display: none;
}

#transcript {
  margin-top: 20px;
  font-size: 20px;
  line-height: 1.5;
  text-align: center;
  font-weight: 600;
  color: #000;
}

#transcript .active {
  color: #AD2B2B;
  font-weight: bold;
}

/* desktop */
@media (min-width: 600px) {
  #buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }

  #buttons .lang-btn {
    width: calc(50% - 6px);
  }

  #tracks {
    flex-direction: row;
    flex-wrap: wrap;
  }

  #tracks button {
    width: calc(50% - 5px);
  }
}
