@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;
}

* {
    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('cover/default-background.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    font-family: 'Oxanium', sans-serif;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.radio-container {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
    max-width: 400px;
}

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

#play-icon, #stop-icon, #reset-icon, #resume-icon {
    cursor: pointer;
    color: #f4f4f4;
}

#play-icon:hover, #stop-icon:hover {
    color: #ffffff;
}

audio {
    display: none;
}

.cover-container {
    position: relative;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.cover {
    width: 80%;
    max-width: 300px;
    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;
}

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;
}

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;
}

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;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Barra avanzamento */
.progress-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    margin: 15px auto 0;
    padding: 0 10px;
    color: white;
    font-size: 0.9em;
    font-family: 'Oxanium', sans-serif;
}

#progress-bar {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: transparent;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

#progress-bar::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
}

#progress-bar::-moz-range-track {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
}

#progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  margin-top: -4px;
  position: relative;
  z-index: 3;
}

#progress-bar::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  border: none;
  position: relative;
  z-index: 3;
}

#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 */
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }
    h2 {
        font-size: 1.5em;
    }
    h3 {
        font-size: 1.2em;
    }
    .cover {
        width: 90%;
        max-width: 200px;
    }
    .controls {
        margin-top: 20px;
    }
    .controls i {
        margin: 0 10px;
        cursor: pointer;
        color: #f4f4f4;
        transition: color 0.3s ease;
    }
    .controls i:hover {
        color: #ffffff;
    }
    #play-icon, #stop-icon, #reset-icon, #resume-icon {
        font-size: 2em;
    }
    .progress-container {
        font-size: 0.8em;
    }
    #progress-bar {
        height: 6px;
    }
    #progress-bar::-webkit-slider-thumb,
    #progress-bar::-moz-range-thumb {
        width: 14px;
        height: 14px;
    }
}
