@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap");

body {
  font-family: "Noto Sans KR", sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  color: #fff;
  background-image: url(static/default.png);
}

.background-blur {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.6);
  z-index: -1;
  transition: background-image 0.5s ease-in-out;
}

.player-container {
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 앨범 커버와 오버레이 버튼 관련 스타일 */
.album-cover {
  width: 150px;
  height: 150px;
  margin-right: 30px;
  position: relative; /* 자식 요소를 위한 기준점 */
  flex-shrink: 0;
}

#album-art {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  src: "static/default.png";
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0; /* 평소엔 숨김 */
  transition: opacity 0.3s ease;
}

/* 재생 중이 아닐 때, 마우스를 올리면 오버레이 보임 */
.album-cover:hover .play-overlay {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.3);
}

.play-overlay svg {
  width: 50px;
  height: 50px;
  fill: white;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.7));
}

#pause-icon {
  display: none; /* 일시정지 아이콘은 기본적으로 숨김 */
}
/* --- */

.song-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 250px;
}

#title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#artist {
  font-size: 16px;
  font-weight: 400;
  color: #ccc;
  margin-bottom: 20px;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  cursor: pointer;
}

.progress-bar {
  height: 100%;
  background-color: #fff;
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

.time-display {
  margin-top: 12px;
  font-size: 14px;
  color: #ccc;
  font-family: monospace; /* 숫자 가독성을 위해 */
}

/* ✨ --- 볼륨 컨트롤 스타일 추가 --- ✨ */
.controls-container {
  margin-top: 25px;
  display: flex;
  justify-content: flex-end; /* 컨트롤을 오른쪽으로 정렬 */
}

.volume-container {
  display: flex;
  align-items: center;
  width: 150px; /* 컨테이너 너비 고정 */
}

.volume-icon {
  cursor: pointer;
  margin-right: 10px;
}

.volume-icon svg {
  width: 24px;
  height: 24px;
  fill: #ccc;
  transition: fill 0.2s ease;
}

.volume-icon:hover svg {
  fill: #fff;
}

/* 볼륨 슬라이더 스타일링 */
#volume-slider {
  -webkit-appearance: none; /* 기본 UI 제거 (Chrome, Safari) */
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

/* 슬라이더 핸들 (동그라미) 스타일 - Chrome, Safari */
#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* 슬라이더 핸들 (동그라미) 스타일 - Firefox */
#volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  border: none;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
