/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
    color: white;
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #1c1c1c);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Canvas */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
}

/* Navbar */
nav {
    font-family: 'Times New Roman', serif;
}

nav ul {
    display: flex;
    align-items: center;
    list-style-type: none;
    height: 65px;
    background: linear-gradient(to bottom, #111, #000);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

nav ul li {
    padding: 0 12px;
}

.brand {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    perspective: 500px;
}

.brand:hover {
    transform: scale(1.05) rotateY(10deg);
}

.brand img {
    width: 60px;
    padding: 0 6px;
    transition: all 0.3s ease;
}

.brand:hover img {
    transform: translateZ(20px) rotateY(-15deg);
    filter: drop-shadow(0 0 10px rgba(29, 185, 84, 0.5));
}

/* Container */
.container {
    background-color: black;
    min-height: 68vh;
    font-family: 'Times New Roman', serif;
    color: gray;
    display: flex;
    margin: 23px auto;
    width: 70%;
    padding: 34px;
    border-radius: 12px;
    background-image: url(head.jpg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: 0 12px 15px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
    perspective: 1000px;
}

.container:hover {
    transform: rotateX(2deg) rotateY(-1deg);
    box-shadow: 20px 20px 40px rgba(0, 0, 0, 0.4);
}

/* Song Item */
.songItem {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    background-color: white;
    color: black;
    margin: 12px 0;
    height: 50px;
    width: 70%;
    border-radius: 34px;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.songItem:hover {
    transform: translateY(-5px) scale(1.02) rotateX(5deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.songItem.playing {
    animation: float 3s ease-in-out infinite;
    border-left: 4px solid #1DB954;
    background: linear-gradient(to right, rgba(29, 185, 84, 0.1), white);
    background-color: #e6ffe6;
    box-shadow: 0px 0px 10px #00ff99;
}

/* Song Item Elements */
.songItem img {
    width: 43px;
    margin: 0 12px;
    border-radius: 34px;
}

.timestamp {
    margin: 0 23px;
}

.timestamp i {
    cursor: pointer;
    margin: 0 6px;
}

.songName {
    font-size: 1rem;
}

/* Audio Bar */
.bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
    color: white;
    flex-direction: column;
    padding: 10px;
}

#myProgressBar {
    width: 90vw;
    cursor: pointer;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #333, #222);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
    -webkit-appearance: none;
}

#myProgressBar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1DB954;
    box-shadow: 0 0 10px rgba(29, 185, 84, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

#myProgressBar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(29, 185, 84, 0.9);
}

/* Icons */
.icons {
    margin: 12px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.icons i {
    padding: 0 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    perspective: 1000px;
}

.icons i:hover {
    transform: scale(1.2) translateY(-5px) rotateY(15deg);
    color: #1DB954;
    text-shadow: 0 0 10px rgba(29, 185, 84, 0.5);
}

.fa-pause-circle {
    transform: scale(0.95) translateZ(-5px);
    color: #1DB954 !important;
}

/* Song Info */
.songInfo {
    display: flex;
    align-items: center;
    position: absolute;
    left: 13vw;
    font-family: 'Times New Roman', serif;
    margin-top: 10px;
}

.songInfo img {
    margin-right: 10px;
    opacity: 0;
    transition: opacity 0.8s ease-in;
}

.songInfo span {
    color: aqua;
    animation: pulse 3s infinite ease-in-out;
    display: inline-block;
}

@keyframes pulse {
    0% { transform: scale(1); text-shadow: 0 0 5px rgba(0, 255, 255, 0.5); }
    50% { transform: scale(1.05); text-shadow: 0 0 15px rgba(0, 255, 255, 0.8); }
    100% { transform: scale(1); text-shadow: 0 0 5px rgba(0, 255, 255, 0.5); }
}

@keyframes float {
    0% { transform: translateY(0px) rotateX(0deg); }
    50% { transform: translateY(-6px) rotateX(5deg); }
    100% { transform: translateY(0px) rotateX(0deg); }
}

/* Responsive Styles */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    height: auto;
    text-align: center;
    padding: 10px 0;
  }

  nav ul li {
    padding: 8px 0;
    font-size: 16px;
  }

  .container {
    flex-direction: column;
    width: 95%;
    margin: 12px auto;
    padding: 20px 10px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
  }

  .songItem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px;
    font-size: 14px;
    background-color: rgba(255,255,255,0.1); /* Optional subtle background */
    border-radius: 10px;
    margin-bottom: 10px;
  }

  .songItem img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    flex-shrink: 0;
    border-radius: 50%;
  }

  .songName {
    flex-grow: 1;
    font-size: 14px;
  }

  .timestamp {
    font-size: 12px;
    white-space: nowrap;
    margin-left: 10px;
  }

  .songlistplay {
    margin-left: 10px;
  }

  .bottom {
    flex-direction: column;
    padding: 15px 10px;
    position: static;
    width: 100%;
  }

  .icons i {
    font-size: 22px;
    padding: 10px;
  }

  .songInfo {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    text-align: center;
  }

  .songInfo img {
    width: 30px;
    height: 30px;
    margin-bottom: 5px;
  }

  #myProgressBar {
    width: 90%;
    margin-top: 10px;
  }

  h1 {
    font-size: 20px;
    text-align: center;
  }

  .brand {
    font-size: 1.3rem;
    justify-content: center;
  }

  .brand img {
    width: 40px;
  }

  #bgCanvas {
    display: none;
  }
}


@media (max-width: 400px) {
  .icons i {
    font-size: 1.5rem;
    margin: 4px;
  }

  .songInfo span {
    font-size: 0.8rem;
  }

  .songName {
    font-size: 0.9rem;
  }

  nav ul li {
    font-size: 0.9rem;
  }

  #myProgressBar {
    height: 6px;
  }
}
