/* style.css */

:root {
  --bg-color: #000;
  --text-color: #fff;
  --container-bg: rgba(0, 0, 0, 0.5);
  --bio-bg: rgba(255, 255, 255, 0.1);
  --font-main: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  display: flex;
  justify-content: center;
  align-items: center;
}

#background {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(15px) brightness(0.4);
  transition: background-image 1s ease;
}

.container {
  position: relative;
  z-index: 1;
  background: var(--container-bg);
  padding: 2rem;
  border-radius: 1.25rem;
  max-width: 420px;
  width: 90vw;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

#cover {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 0.55rem;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4);
  opacity: 0;
  transition: opacity 0.8s ease;
}

#nowplaying {
  font-size: 1rem;
  font-weight: 600;
}

audio {
  width: 75%;
  height: 30px;
  background: transparent;
}

#bio {
  display: none;
  background: var(--bio-bg);
  padding: 1rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  color: #eee;
  line-height: 1.5;
  max-height: 250px;
  overflow-y: auto;
  text-align: center;
}

#toggle-history {
  background: rgba(255,255,255,0.1);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

#toggle-history:hover {
  background: rgba(255,255,255,0.2);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  width: 100vw;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 1rem;
}


.modal.show {
  display: flex;
  animation: slideDown 0.4s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content {
  background: #c8ad74;
  padding: 1.5rem;
  border-radius: 1.25rem;
  width: 90vw;
  max-width: 420px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#close-history {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
}

#last5 {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  color: #fff;
  gap: 0.75rem;
}

#last5 li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

.last-cover {
  width: 40px;
  height: 40px;
  border-radius: 0.4rem;
  object-fit: cover;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .container {
    padding: 1.5rem;
  }
  #cover {
    width: 160px;
    height: 160px;
  }
  #bio {
    max-height: 260px;
  }
}

@media (min-height: 700px) and (max-width: 600px) {
  .container {
    height: 90vh;
    justify-content: space-evenly;
  }
}

@media (max-width: 600px) {
  .modal-content {
    width: 100%;
    max-width: 360px;
  }
}

