/* player-controls.css */
/* --- 底部控制条 --- */
.player-controls {
    grid-row: 2 / 3;
    background-color: var(--surface-color);
    padding: 0 25px;
    display: grid;
    grid-template-columns: 3fr 4fr 3fr;
    align-items: center;
    border-top: 1px solid #282828;
    z-index: 2001; /* 【修改】确保 z-index 高于面板 */
    position: relative; /* 【新增】确保 z-index 生效 */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.track-info {
    display: flex;
    align-items: center;
    min-width: 0;
}
.track-info img {
    width: 56px;
    height: 56px;
    margin-right: 15px;
    border-radius: 4px;
    flex-shrink: 0;
    object-fit: cover; /* 【新增】确保图片保持宽高比，裁剪以适应容器 */
}
.track-details {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#track-title {
    font-size: 14px;
    font-weight: 500;
}
#track-artist {
    font-size: 12px;
    color: var(--text-secondary);
}
.main-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.control-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}
.control-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    padding: 8px;
}
.control-btn:hover {
    color: var(--text-primary);
}
.control-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
#play-pause-btn {
    background-color: var(--slider-thumb-color);
    color: #000;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.1s ease-out;
    padding: 0;
}
#play-pause-btn:hover {
    transform: scale(1.08);
}
.pause-icon { display: none; }
.playing .play-icon { display: none; }
.playing .pause-icon { display: block; }

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    font-size: 12px;
    color: var(--text-secondary);
}
.progress-bar, .volume-bar {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background-color: var(--slider-track-color);
    background-image: linear-gradient(var(--primary-color), var(--primary-color));
    background-size: var(--value-percent, 0%) 100%;
    background-repeat: no-repeat;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.progress-bar::-webkit-slider-thumb, .volume-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--slider-thumb-color);
    border-radius: 50%;
    opacity: 1;
}
.progress-bar::-moz-range-thumb, .volume-bar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--slider-thumb-color);
    border-radius: 50%;
    border: none;
    opacity: 1;
}

.side-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.volume-container {
    display: flex;
    align-items: center;
}
.mute-icon { display: none; }
.muted .volume-icon { display: none; }
.muted .mute-icon { display: block; }
.volume-bar {
    width: 100px;
}

#mode-btn .mode-icon { display: none; }
#mode-btn.mode-list .list-loop-icon { display: block; }
#mode-btn.mode-single .single-loop-icon { display: block; }
#mode-btn.mode-shuffle .shuffle-icon { display: block; }
#mode-btn.mode-single, #mode-btn.mode-shuffle {
    color: var(--primary-color);
}
.mobile-only-btn { display: none; }