@font-face {
    
    font-family: 'Oxanium';
    
    src: url('fonts/Oxanium-ExtraLight.woff2') format('woff2'),
    
         url('fonts/Oxanium-ExtraLight.woff') format('woff'),
         
         url('fonts/Oxanium-ExtraLight.ttf') format('truetype');
         
    font-weight: 200;
    
    font-style: normal;
    
}

@font-face {
    
    font-family: 'Oxanium';
    
    src: url('fonts/Oxanium-Light.woff2') format('woff2'),
    
         url('fonts/Oxanium-Light.woff') format('woff'),
         
         url('fonts/Oxanium-Light.ttf') format('truetype');
         
    font-weight: 300;
    
    font-style: normal;
    
}

@font-face {
    
    font-family: 'Oxanium';
    
    src: url('fonts/Oxanium-Regular.woff2') format('woff2'),
    
         url('fonts/Oxanium-Regular.woff') format('woff'),
         
         url('fonts/Oxanium-Regular.ttf') format('truetype');
         
    font-weight: 400;
    
    font-style: normal;
    
}

@font-face {
    
    font-family: 'Oxanium';
    
    src: url('fonts/Oxanium-Medium.woff2') format('woff2'),
    
         url('fonts/Oxanium-Medium.woff') format('woff'),
         
         url('fonts/Oxanium-Medium.ttf') format('truetype');
         
    font-weight: 500;
    
    font-style: normal;
    
}

@font-face {
    
    font-family: 'Oxanium';
    
    src: url('fonts/Oxanium-SemiBold.woff2') format('woff2'),
    
         url('fonts/Oxanium-SemiBold.woff') format('woff'),
         
         url('fonts/Oxanium-SemiBold.ttf') format('truetype');
         
    font-weight: 600;
    
    font-style: normal;
}

/* Aggiungere reset CSS per evitare margini e padding di default sui vari dispositivi */

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}



body {

    display: flex;

    justify-content: center;

    align-items: center;

    min-height: 100vh;

    background-color: #282c34;

    background-image: url('background.jpg');

    background-size: cover;

    background-position: center;

    color: white;

    font-family: 'Oxanium', sans-serif; /* Imposta il font Oxanium */

    margin: 0;

    position: relative;

    overflow: hidden;

}



.radio-container {

    text-align: center;

    position: relative;

    z-index: 2;

    padding: 20px;

    width: 100%;

    max-width: 400px; /* Limitare la larghezza massima per dispositivi più grandi */

}



.controls {

    margin-top: 20px;

    display: flex;

    justify-content: center;
	
	gap: 10px;

}



#play-icon, #stop-icon, #reset-icon, #resume-icon, #prev-icon, #next-icon {

    cursor: pointer;

    color: #f4f4f4;

}



#play-icon:hover, #stop-icon:hover {

    color: #ffffff;

}



audio {

    display: none; /* Nascondere l'elemento audio */

}



.cover-container {

    position: relative;

    display: inline-block;

    text-align: center;

    width: 100%;

}



.cover {

    width: 80%;

    max-width: 300px; /* Limita la larghezza massima della copertina */

    height: auto;

    position: relative;

    border-radius: 50px;

    overflow: hidden;

    margin: 0 auto;

}



.cover img {

    width: 100%;

    height: auto;

    object-fit: cover;

    position: relative;

    z-index: 2;

}



.cover-background {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    background-size: cover;

    background-position: center;

    opacity: 0.5;

    z-index: 1;

}

.progress-container {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    /* MODIFICA: Nascondiamo la barra di base */
    opacity: 0;
    pointer-events: none; /* Impedisce di cliccarla quando è invisibile */
    transition: opacity 0.5s ease; /* Effetto comparsa fluido */
}

/* NUOVO: Questa classe la renderà visibile */
.progress-container.visible {
    opacity: 1;
    pointer-events: auto;
}

#seek-bar {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.2) 0%);
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

/* Track trasparente su WebKit (Chrome, Safari, Edge) */
#seek-bar::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: transparent;
}

/* Track trasparente su Firefox */
#seek-bar::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: transparent;
}

/* Thumb stile Apple Music */
#seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
  margin-top: -5px;
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease;
}
#seek-bar::-moz-range-thumb {
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
  border: none;
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease;
}

/* Effetto zoom al passaggio del mouse (facoltativo) */
#seek-bar:hover::-webkit-slider-thumb,
#seek-bar:hover::-moz-range-thumb {
  transform: scale(1.2);
}

#current-time {
    margin-right: 10px;
}

#remaining-time {
    margin-left: 10px;
}

#progress-bar {
    flex-grow: 1;
    margin: 0 5px; /* facoltativo, per un po' di spazio anche ai lati della barra */
}

h1 {

    font-size: 2.5em;

    color: #f4f4f4;

    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);

}

#logo {
	
    max-width: 200px;
	
    height: auto;
	
	display: block;
	
	margin: 0 auto; /* Aggiunto per centrare l'immagine orizzontalmente */
	
}

h2 {

    margin: 10px 0 5px 0;

    font-size: 1.4em;

    font-weight: bold;

    color: #f4f4f4;

    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    
    font-family: 'Oxanium', sans-serif;
    
    font-weight: 500; /* Medium 500 */

}



h3 {

    margin: 0 0 10px 0;

    font-size: 1em;

    font-style: italic;

    color: #f4f4f4;

    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    
    font-family: 'Oxanium', sans-serif;
    
    font-weight: 200; /* ExtraLight 200 */

}



body::before {

    content: '';

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    background: rgba(0, 0, 0, 0.5);

    z-index: 1;

}



/* Media Queries per dispositivi mobili */

@media (max-width: 768px) {

    h1 {

        font-size: 2em;

    }



    h2 {

        font-size: 1.5em;

    }



    h3 {

        font-size: 1.2em;

    }



    .cover {

        width: 90%;

        max-width: 200px; /* Ridurre la dimensione massima su dispositivi mobili */

    }



    .controls {
        margin-top: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
    }



    .controls i {
		margin: 0 10px; /* fallback per browser che non supportano gap */
        cursor: pointer;
        color: #f4f4f4;
        transition: color 0.3s ease;
    }

    .controls i:hover {
        color: #ffffff;
    }

    #play-icon, #stop-icon, #reset-icon, #resume-icon, #prev-icon, #next-icon {

        font-size: 2em;

    }

}

.playlist-container {
    margin-top: 30px;
	margin-bottom: 30px;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 10px;
}

.playlist-title {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .3s;
}

.playlist-item:hover {
    background: rgba(255,255,255,0.15);
}

.playlist-item.active {
    background: rgba(30,215,96,0.3);
}

.track-number {
    width: 30px;
    font-size: .9rem;
    opacity: .7;
}

.track-info {
    flex: 1;
}

.track-title {
    font-weight: 600;
    display: block;
}

.track-artist {
    font-size: .7rem;
    opacity: .6;
}

.track-playing {
    color: #1DB954;
}

.playlist-list::-webkit-scrollbar {
    width: 5px;
}

.playlist-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.5);
    border-radius: 20px;
}