#audio-playlist-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#playlist-header {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#playlist-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

#playlist-toggle {
    background: #007cba;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#playlist-toggle:hover {
    background: #005a87;
}

#playlist-items {
    max-height: 350px;
    overflow-y: auto;
}

.playlist-item {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    font-size: 14px;
}

.playlist-item:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

.playlist-item.playing {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
    border-left: 3px solid #1976d2;
}

.playlist-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.track-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    text-align: center;
    font-weight: 500;
    color: #666;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 12px;
}

.playlist-item.playing .track-number {
    color: white;
    background: #1976d2;
}

.track-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
}

.playlist-item.playing .track-title {
    font-weight: 500;
}

.track-status {
    color: #1976d2;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    font-size: 16px;
}

/* プレーヤーコンテナの調整 */
.content-description .mejs-container {
    margin-bottom: 10px !important;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    #audio-playlist-container {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-height: 60vh;
        border-radius: 12px 12px 0 0;
    }
    
    #playlist-header {
        border-radius: 12px 12px 0 0;
    }
    
    .track-title {
        font-size: 13px;
    }
    
    .playlist-item {
        padding: 10px 16px;
    }
}

/* スクロールバーのスタイル */
#playlist-items::-webkit-scrollbar {
    width: 6px;
}

#playlist-items::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#playlist-items::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#playlist-items::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* アニメーション効果 */
.playlist-item {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
