@font-face {
  font-family: 'MyLocalFont';
  src: url('fonts/Nexa-Heavy.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Hide volume slider and mute button on mobile */
/*@media (max-width: 768px) {
  #volume,
  #mute {
    display: none;
  }
}*/

@media (max-width: 480px) {
  #volume,
  #mute {
    display: none;
  }
  .track-title { font-size: 16px; }
  .controls {
    justify-content: flex-end !important;
    padding-right: 10px;
  }
  .controls button { width: 32px; height: 32px; }
  .controls button img { width: 18px; height: 18px; }
  .playlist-item { font-size: 12px; padding: 6px 4px; }
  
}

/* Global */
body {
  font-family: 'MyLocalFont', Arial, sans-serif;
  background: #111;
  display: flex;
  justify-content: center;   /* center horizontally */
  align-items: flex-start;   /* stack from top */
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: white;
}

/* Player container */
.player-container {
  width: 100%;
  max-width: 420px;
  height: 100vh;            /* full viewport height */
  display: flex;
  flex-direction: column;    /* stack elements vertically */
  justify-content: center;   /* center vertically */
  background: #000;
  border: 0px solid rgb(39, 39, 39);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  padding: 10px;
  box-sizing: border-box;
  color: white;
}

/* Album art */
.album-art-container img {
  width: 100%;
  height: auto;       /* keep proportions */
  border-radius: 0;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

/* Track title row */
.title-row {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 0;
  padding-bottom: 0;
}

.track-title {
  font-size: 18px;
  font-weight: bold;
  text-align: left;
  flex-grow: 1;
  color: white;
  margin: 0;
  padding: 0;
}

.track-count {
  font-size: 11px;
  color: #585858;
  font-weight: normal;
  position: absolute;
  right: 0;
  margin: 0;
  padding: 0;
}

/* Progress bar */
.progress-container {
  width: 100%;
  margin: 10px 0;
}

.time-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-container span {
  font-size: 12px;
  color: #ccc;
  width: 35px;
  text-align: center;
}

/* Audio element - keep tiny but in DOM flow so Safari won't pause it */
#audio {
  opacity: 0;
  width: 1px;
  height: 1px;
  position: relative; /* not absolute/removed from flow */
  left: 0;
}

.progress,
#volume {
  -webkit-appearance: none;
  appearance: none;
  flex-grow: 1;
  height: 5px;
  background: #333;
  border-radius: 5px;
  outline: none;
  transition: background 0.9s;
}

.progress:hover,
#volume:hover {
  background: rgb(167, 58, 58);
  transition: background .9s;
}

.progress::-webkit-slider-thumb,
#volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: solid 2px rgb(0, 0, 0);
  background: rgb(167, 58, 58);
  transition: background .9s;
  cursor: pointer;
}

.progress:hover::-webkit-slider-thumb,
#volume:hover::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: solid 2px rgb(167, 58, 58);
  background: rgb(0, 0, 0);
  transition: background .9s;
  cursor: pointer;
}

/* Controls container */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding-bottom: 15px;
}

/* Controls buttons */
.controls button,
.volume-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.controls button img,
.volume-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: invert(100%);
  background: transparent;
  pointer-events: none;
}

.controls button:hover img,
.volume-btn:hover img {
  filter: invert(100%) brightness(0.4);
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Playlist */
.playlist {
  margin-top: 0px;
  padding-top: 0px;
  background: rgb(0, 0, 0);
}

.playlist-title {
  font-weight: bold;
  font-size: 14px;
  text-align: left;
  color: white;
  padding: 0px;
  margin-bottom: 10px;
  border-bottom: 0px solid dimgray;
}

.playlist-item {
  transition: background 0.6s;
  font-size: 13px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 5px;
  cursor: pointer;
  color: rgb(255, 255, 255);
}

.playlist-item:not(:last-child) {
  border-bottom: 1px solid dimgray;
}

.playlist-item:first-child {
  padding-top: 0;
}

.playlist-item:hover {
  transition: background 0.2s, font-weight 0.8s;
  background: rgb(40,40,40);
}

.playlist-item.active {
  transition: background 0.2s, font-weight 0.8s;
  background: rgb(17, 17, 17);
  font-weight: bold;
  color: rgb(255, 255, 255);
}

.social-icons {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  max-width: 420px;
  margin: 20px auto;
  padding: 0;
}

.social-icons a {
  font-size: 30px;
  color: rgba(255, 255, 255, 0.3); /* Resting gray */
  text-decoration: none;
  transition: color 1.5s linear; /* Fade-out only */
}

.social-icons a:hover {
  transition: none; /* Instant color change on hover */
}

.social-icons img.social-img {
  width: 34px; /* Match other icons */
  height: 34px;
  cursor: pointer;
  filter: brightness(0.4);
  transition: filter 1.7s linear; /* Fade-out only */
}

.social-icons img.social-img:hover {
  filter: brightness(1); /* Full brightness on hover */
  transition: none; /* Instant change on hover */
}

/* Individual hover colors */
.social-icons a .fa-instagram { 
  color: rgba(255, 255, 255, 0.3); 
  transition: color 1.7s; 
}
.social-icons a .fa-instagram:hover { 
  color: #c53fd6; 
  transition: none; 
}

.social-icons a .fa-youtube { 
  color: rgba(255, 255, 255, 0.3); 
  transition: color 1.7s; 
}
.social-icons a .fa-youtube:hover { 
  color: #ff0000; 
  transition: none; 
}

.social-icons a .fa-spotify { 
  color: rgba(255, 255, 255, 0.3); 
  transition: color 1.7s; 
}
.social-icons a .fa-spotify:hover { 
  color: #45c939; 
  transition: none; 
}

.social-icons a .fa-apple { 
  color: rgba(255, 255, 255, 0.3); 
  transition: color 1.7s; 
}
.social-icons a .fa-apple:hover { 
  color: #ffffff; 
  transition: none; 
}

.social-icons a .fa-soundcloud { 
  color: rgba(255, 255, 255, 0.3); 
  transition: color 1.7s; 
}
.social-icons a .fa-soundcloud:hover { 
  color: #ff7b00; 
  transition: none; 
}

.social-icons a .fa-bandcamp { 
  color: rgba(255, 255, 255, 0.3); 
  transition: color 1.7s; 
}
.social-icons a .fa-bandcamp:hover { 
  color: #26b6c9; 
  transition: none; 
}

.social-icons a .fa-deezer { 
  color: rgba(255, 255, 255, 0.3); 
  transition: color 1.7s; 
}
.social-icons a .fa-deezer:hover { 
  color: #ffffff; 
  transition: none; 
}

.social-icons a .fa-amazon { 
  color: rgba(255, 255, 255, 0.3); 
  transition: color 1.7s; 
}
.social-icons a .fa-amazon:hover { 
  color: #ffd23d; 
  transition: none; 
}