/* 全域設定 */
body {
    font-family: "微軟正黑體", sans-serif;
    margin: 0;
    padding: 20px;
    color: #333;
}

h1 {
    text-align: center;
}

.container {
    display: flex;
    gap: 20px;
}

/* 左側歌名列表 */
.song-list {
    width: 30%;
}

#search {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ff99cc; /* 粉色邊框 */
    border-radius: 5px;
    box-sizing: border-box;
}

.song-list ul {
    list-style: none;
    padding: 0;
}

.song-list li {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px dashed #ff99cc; /* 粉色虛線 */
    transition: background-color 0.3s;
}

.song-list li:hover {
    background-color: #ffe4e1;
}

.song-list li.active {
    background-color: #ffccd9; /* 當前播放高亮 */
}

/* 歌詞區塊 */
.song-detail {
    width: 70%;
    padding: 10px;
    border-left: 2px dashed #ff99cc; /* 粉色虛線 */
    opacity: 0;
    transition: opacity 0.6s ease;
}

.song-detail.visible {
    opacity: 1;
}

/* 音樂播放器美化 - 小巧精緻版 */
.song-detail audio {
    width: 100%;
    height: 30px; /* 小巧高度 */
    background: #fff0f5; /* 淡粉背景 */
    border-radius: 15px;
    outline: none;
    border: 2px solid #ff99cc;
    box-shadow: 0 3px 6px rgba(255,153,204,0.3);
    margin-bottom: 15px;
}

/* 自訂進度條 (Chrome, Edge, Safari) */
.song-detail audio::-webkit-media-controls-panel {
    background: #fff0f5;
    border-radius: 15px;
}

.song-detail audio::-webkit-media-controls-play-button,
.song-detail audio::-webkit-media-controls-mute-button,
.song-detail audio::-webkit-media-controls-volume-slider {
    filter: invert(25%) sepia(80%) saturate(500%) hue-rotate(320deg);
}

/* Firefox 進度條 */
.song-detail audio::-moz-range-track {
    background: #ffccd9;
    height: 6px;
    border-radius: 3px;
}
.song-detail audio::-moz-range-thumb {
    background: #ff99cc;
    border-radius: 50%;
    border: none;
    height: 14px;
    width: 14px;
}

/* 打字機文字樣式 */
.typewriter pre {
    display: inline-block;
    border-right: 2px solid #ff99cc;
    white-space: pre-wrap;
    overflow: hidden;
    animation: blinkCursor 0.7s step-end infinite;
    font-size: 16px;
    line-height: 1.6em;
}

@keyframes blinkCursor {
    0%, 100% { border-color: transparent; }
    50% { border-color: #ff99cc; }
}
