/* 全域重設：打造沉浸式高級舞台背景 */
body {
    background: radial-gradient(circle at center, #2c3e50 0%, #0f171e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
}

/* iPod 機身：自適應比例，完美適配 iPad 螢幕 */
.ipod-body {
    background: linear-gradient(135deg, #ffffff 0%, #dcdcdc 50%, #b8b8b8 100%);
    width: 90vw;
    max-width: 460px; /* 限制最大寬度 */
    height: 92vh;
    max-height: 820px;
    border-radius: 40px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.7),
        inset 0 2px 3px #ffffff,
        inset 0 -3px 5px rgba(0,0,0,0.2);
    padding: 4vh 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    border: 2px solid #a8a8a8;
}

/* 復古 LCD 螢幕：微弱內發光感 */
.ipod-screen {
    background: linear-gradient(to bottom, #f4f6f9 0%, #e1e5ea 100%);
    width: 100%;
    height: 42%; 
    border-radius: 12px;
    border: 5px solid #222;
    box-shadow: 
        inset 0px 5px 15px rgba(0,0,0,0.3),
        0 4px 10px rgba(0,0,0,0.1);
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    color: #1c2321;
}

/* 螢幕頂部列 */
.screen-header {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #b5b9be;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.app-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.2));
}

.app-title {
    font-size: 18px;
    margin: 0 0 0 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #333;
}

/* 播放中資訊 */
.now-playing {
    font-size: 15px;
    margin-bottom: 10px;
}

#track-title {
    margin: 0 0 8px 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 經典進度條 */
.progress-bar-container {
    background-color: #bdc3c7;
    height: 8px;
    width: 100%;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
    overflow: hidden;
}

#progress-bar {
    background: linear-gradient(to right, #00a8ff, #0077c8);
    height: 100%;
    width: 0%;
    transition: width 0.1s linear;
}

/* 歌曲清單觀看區：滾動條細節 */
.playlist-container {
    flex: 1;
    overflow-y: auto;
    font-size: 14px;
    margin-top: 5px;
}

.playlist-container::-webkit-scrollbar {
    width: 6px;
}
.playlist-container::-webkit-scrollbar-thumb {
    background: #b5b9be;
    border-radius: 3px;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

li:hover {
    background-color: rgba(0,0,0,0.05);
}

li.active {
    background-color: #34495e;
    color: white;
    border-radius: 4px;
}

/* 經典 Click Wheel 轉盤：帶重工業陰影的經典灰 */
.click-wheel {
    background: linear-gradient(145deg, #f0f0f0, #d6d6d6);
    width: 52vw;
    height: 52vw;
    max-width: 240px;
    max-height: 240px;
    border-radius: 50%;
    position: relative;
    box-shadow: 
        inset 0 8px 12px rgba(255,255,255,0.8),
        inset 0 -8px 12px rgba(0,0,0,0.1),
        0 12px 24px rgba(0,0,0,0.3);
    border: 1px solid #c8c8c8;
    margin-bottom: 2vh;
}

/* 轉盤上的文字與圖標：復古深灰刻印感 */
.click-wheel button {
    position: absolute;
    background: none;
    border: none;
    color: #555555;
    font-weight: 700;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
}

.click-wheel button:hover {
    color: #111;
}

#menu-btn { top: 18px; left: 50%; transform: translateX(-50%); font-size: 15px; letter-spacing: 1px; }
#prev-btn { left: 18px; top: 50%; transform: translateY(-50%); }
#next-btn { right: 18px; top: 50%; transform: translateY(-50%); }
#play-btn { bottom: 18px; left: 50%; transform: translateX(-50%); }

/* 中央確認鈕（CD核心）：超擬物放射狀金屬鈕 */
.center-button {
    position: absolute;
    width: 32%;
    height: 32%;
    background: radial-gradient(circle, #fcfcfc 0%, #cccccc 60%, #aaaaaa 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.25), 
        inset 0 2px 3px #ffffff,
        inset 0 -2px 3px rgba(0,0,0,0.15);
    cursor: pointer;
    border: 1px solid #999;
}

.center-button:active {
    background: radial-gradient(circle, #cccccc 0%, #aaaaaa 100%);
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.3);
}