/* YouTube Music 播放器样式 V2 - 更接近真实YouTube Music */
.ytmusic-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #212121;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* 播放进度条 */
.ytmusic-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.ytmusic-progress-fill {
    height: 100%;
    background: #ff0000;
    width: 0;
    position: relative;
}

.ytmusic-progress-handle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #ff0000;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.ytmusic-progress-bar:hover .ytmusic-progress-handle {
    opacity: 1;
}

/* 播放器主体 */
.ytmusic-player-content {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 90px;
}

/* 左侧 - 当前播放信息 */
.ytmusic-now-playing {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 14px;
}

.ytmusic-thumbnail {
    width: 48px;
    height: 48px;
    object-fit: cover;
    cursor: pointer;
}

.ytmusic-song-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ytmusic-song-title {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.ytmusic-song-title:hover {
    text-decoration: underline;
}

.ytmusic-song-artist {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.ytmusic-song-artist:hover {
    color: #fff;
    text-decoration: underline;
}

/* 中间 - 播放控制 */
.ytmusic-player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ytmusic-control-buttons {
    display: flex;
    align-items: center;
    gap: 0;
}

.ytmusic-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ytmusic-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.ytmusic-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ytmusic-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.ytmusic-btn.play-pause svg {
    width: 40px;
    height: 40px;
}

.ytmusic-btn.shuffle.active,
.ytmusic-btn.repeat.active {
    color: #fff;
}

.ytmusic-time-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* 右侧 - 额外控制 */
.ytmusic-player-actions {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    justify-content: flex-end;
}

.ytmusic-volume-container {
    display: flex;
    align-items: center;
}

.ytmusic-volume-slider {
    width: 0;
    overflow: hidden;
    transition: width 0.2s;
    margin-left: 8px;
}

.ytmusic-volume-container:hover .ytmusic-volume-slider {
    width: 100px;
}

.ytmusic-volume-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
}

.ytmusic-volume-fill {
    height: 100%;
    background: #fff;
    border-radius: 2px;
}

/* 喜欢/不喜欢按钮 */
.ytmusic-btn.like.active svg {
    fill: #fff;
}

.ytmusic-btn.dislike.active svg {
    fill: #fff;
}

/* 队列面板 */
.ytmusic-queue-panel {
    position: fixed;
    bottom: 90px;
    right: 0;
    width: 300px;
    background: #212121;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
}

.ytmusic-queue-panel.active {
    transform: translateX(0);
}

.ytmusic-queue-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    font-weight: 500;
    color: #fff;
}

.ytmusic-queue-list {
    flex: 1;
    overflow-y: auto;
}

.ytmusic-queue-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ytmusic-queue-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.ytmusic-queue-item.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.ytmusic-queue-item-thumbnail {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    object-fit: cover;
}

.ytmusic-queue-item-info {
    flex: 1;
    min-width: 0;
}

.ytmusic-queue-item-title {
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ytmusic-queue-item-artist {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ytmusic-player-content {
        padding: 0 12px;
        height: 64px;
    }
    
    .ytmusic-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .ytmusic-song-title,
    .ytmusic-song-artist {
        font-size: 12px;
    }
    
    .ytmusic-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .ytmusic-btn.play-pause svg {
        width: 32px;
        height: 32px;
    }
    
    .ytmusic-time-info {
        display: none;
    }
    
    .ytmusic-btn.shuffle,
    .ytmusic-btn.repeat,
    .ytmusic-btn.like,
    .ytmusic-btn.dislike {
        display: none;
    }
    
    .ytmusic-queue-panel {
        width: 100%;
        right: 0;
        left: 0;
    }
}