@charset "utf-8";
/* CSS Document */
/* --- 播放器主體 --- */
.music-player {
    background: #ffffff;
    width: 90%;
    max-width: 450px;
    height: 95vh; /* 佔手機頁面高度 95% */
    padding: 25px;
    border-radius: 30px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
    
    /* 使用 Flex 佈局精確分配內部空間 */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
	margin: 5px 0 10px 0;
}

/* --- 頂部資訊區 (固定大小) --- */
.adsound_title {
	height: 33px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.adsound_title p {
	font-size: 1.4rem;
	font-weight: bold;
}

.song-info {
    flex-shrink: 0;
    text-align: center;
    padding: 20px 0 0 0;
}

.song-info h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #1a1a1a;
    /* 增加：文字過長時顯示省略號 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- 進度條與時間 (固定大小) --- */
.progress-container {
    flex-shrink: 0;
    background: #eee;
    height: 6px;
    border-radius: 10px;
    cursor: pointer;
    margin: 25px 0 10px;
}

.progress {
    background: #007aff;
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.1s linear;
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* --- 控制鈕區 (固定大小) --- */
.controls {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
}

.controls button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.controls svg {
    width: 32px;
    height: 32px;
    fill: #444;
}

.play-btn svg {
    width: 65px;
    height: 65px;
    fill: #007aff !important;
}

/* --- 音量區 (固定大小) --- */
.volume-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9f9f9;
    padding: 10px 18px;
    border-radius: 40px;
    margin-bottom: 15px;
}

#volume-slider {
    flex: 1;
    accent-color: #007aff;
    cursor: pointer;
}

#vol-icon svg {
    fill: #888;
}

/* --- 播放清單 (佔播放器 60% 高度) --- */
.playlist-container {
    flex-basis: 60%; /* 指定佔據比例 */
    flex-grow: 1;    /* 填滿剩餘空間 */
    overflow-y: auto;
    border-top: 1px solid #f0f0f0;
    margin: 0 -10px; /* 稍微撐開邊界讓視覺更好看 */
    padding: 0 10px;
}

/* 隱藏清單捲動軸 (可選，讓介面更乾淨) */
.playlist-container::-webkit-scrollbar {
    width: 4px;
}
.playlist-container::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 10px;
}

#playlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

#playlist li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 12px;
    border-bottom: 1px solid #fafafa;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    transition: background 0.2s;
}

#playlist li:active {
    background-color: #f0f7ff;
}

#playlist li.active {
    color: #007aff;
    font-weight: 600;
    background: #f0f7ff;
    border-radius: 12px;
}

/* 清單內文字溢出處理 */
#playlist li span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}